🔍 See Original Answer on Ask Ubuntu 🔗
Protecting WSL-Ubuntu and WSL-OpenSSH (unfiltering port 443 correctly, to use just these)
December 22, 2018
Edited: June 12, 2020
November 24, 2022
Copy to clipboard: false
Version 1803 allows outgoing connections on all ports
Windows WSL Version 1803 (March 2018) allowed all ports as outgoing connections. Version 1809 (September 2018). However this version was pulled soon after release due to unrelated bugs. Your question doesn’t mention which version you are running.
One month ago (Novemeer 2018) From Redit:
WSL support for the built-in Windows Firewall
As I understand it the October Windows 10 1809 update finally added WSL support for the built-in Windows Firewall.
Previously, the only way to use WSL was to allow all outgoing connections, as it was not aware of pico.
However, it seems the 1809 update has been pulled for unrelated issues and is and isn’t available for download anymore.
I’m on 1803 and I’m wondering if there is any way to get this functionality back or do I have to wait until 1809 is re-released?
History, more info on this: https://github.com/Microsoft/WSL/issues/1852