WSL2 – Connect to Host Without Disabling Windows Firewall

networkingUbuntuvirtual machinewindows firewallwindows-subsystem-for-linux

I simply want to connect from my WSL2 Ubuntu installation to my host windows on port 8529.

What I tried:

This question has been ask quite a view times, but none of the usual answers worked for me.

Best Answer

You can disable the firewall only for the vEthernet (WSL) interface. This way you will allow connections from WSL while still having the firewall protect your computer from external threats.

  • Go to Firewall Settings and click on Advanced Settings
  • Click Windows Defender Firewall Properties
  • Select Public Profile tab
  • Click Customize Protected network connections enter image description here
  • Unclick vEthernet (WSL)
Related Question