Firewall blocking WSL 2

Viewed 12104

My firewall (Norton) is blocking WSL 2 from using the internet. I cannot ping even google.

When I turn the firewall off, everything works, and when I turn it back on again, it no longer works.

What rules do I have to set on the firewall to allow WSL to go through? Will it work for all firewalls or just Norton?

2 Answers

Whitelist C:\Windows\System32\bash.exe and C:\Windows\System32\wsl.exe in every antivirus software or firewall you use.

If that doesn't work, try adding the distro_name.exe file of you installed distro. You'll find a the distro_name.exe file inside a subfolder with you distro name in C:\Program Files\WindowsApps\

My SSH it was blocked by Norton 360 in a mysterious way. But in the link below I found two temporary solutions that solves the problem to me. https://askubuntu.com/questions/1229456/ssh-fails-with-connection-timed-out-in-vpn-and-hangs-here-expecting-ssh2-msg

Setting MTU to 1200 solved it for me (Ubuntu 20.04): sudo ip li set mtu 1200 dev {dev}

or

Setting the KEX algorithm manually solves the problem.

Add KexAlgorithms ecdh-sha2-nistp521 to the corresponding SSH config, or add -oKexAlgorithms=ecdh-sha2-nistp521 to the command line args for one time use.

Reference (2019): https://superuser.com/a/1462220/555702

Related