6

Intellij IDEA cannot 'see' my WSL java installation. I thought firewall rules could be the culprit. (I've previously been using Kaspersky firewall but recently switched to just using windows defender, so it's possible things that should have been set up on installation of WSL or IDEA that never were)

The official jetbrains docs plus this issue on wsl suggest the following powershell command:

New-NetFirewallRule -DisplayName "WSL" -Direction Inbound  -InterfaceAlias "vEthernet (WSL)"  -Action Allow

Looking at my defender firewall inbound rules, it does appear that there is no rule for WSL or called WSL, so it would make sense that something of WSL is being blocked. However, running this either as an administrator or normal user, gives me this error:

New-NetFirewallRule : The specified interface was not found on the system.
At line:1 char:1
+ New-NetFirewallRule -DisplayName "WSL" -Direction Inbound  -Interface ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (MSFT_NetFirewallRule:root/standardcimv2/MSFT_NetFirewallRule) [New-NetFirewallRule], CimExceptio
   n
    + FullyQualifiedErrorId : HRESULT 0x80070057,New-NetFirewallRule

Googling the first line of this error yields one result that isn't in English, so I have no idea what this means. It's not even clear from the error which argument is problematic. What's the problem with this command on my machine that apparently isn't a problem on anyone else's?

1 Answer 1

0

use the command:

Get-NetAdapter -IncludeHidden

u should find the vEthernet name, replace the "vEthernet (WSL)" in your command

2
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Mar 1 at 11:59
  • oh your system edition should be win11 pro or win10 pro in order to open the hyper-v, if it's not please see this: beebom.com/install-hyper-v-on-windows-10-home
    – WoodHolz
    Commented Mar 1 at 16:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .