WSL2 Is bypassing windows firewall rules. #10579
Replies: 3 comments 2 replies
-
@rjadidi920 latest WSL beta release added an experimental option to firewall your WSL containers. See details at https://devblogs.microsoft.com/commandline/windows-subsystem-for-linux-september-2023-update. This works on Windows 11 only! Windows 10 doesn't support
Output when trying to connect from WSL to a local host:
This is the firewall rule on Windows side that gets mirrored to WSL side:
|
Beta Was this translation helpful? Give feedback.
-
@elsaco Is this some sort of a joke? What about like 99% of enterprise Windows 10,11's out there that are using Windows firewall to block connections in their comapny/sector? Are you guys actually asking everyone to stop trusting any security feature that Microsoft has? How can we block the WSL2 network connections entirely by default in endpoints without changing the config of WSL containers? Don't tell me we don't even have an option to entirely block WSL2 network connections.. |
Beta Was this translation helpful? Give feedback.
-
This is a sick joke from Microsoft, bypassing its own security measures. The ridiculousness increases due to the fact that the last response is from October 2023. Also, '.wslconfig' is user editable, so I'll have to inject a new config file for everyone and remove write privileges, which is archaic at least. I will open a security incident with MS about this (P1), but most probably I'll be ignored like the others on this post were. |
Beta Was this translation helpful? Give feedback.
-
Windows Version
Windows 10,11
WSL Version
2
Are you using WSL 1 or WSL 2?
Kernel Version
No response
Distro Version
No response
Other Software
No response
Repro Steps
Add a outbound blocking rule in firewall for port 22.
Use a WSL2 linux VM. SSH to a server, it doesn't get blocked by the firewall rule.
Expected Behavior
Blocking SSH of the WSL2 VMs.
Actual Behavior
Not blocking SSH connection of WSL2 VMs.
Diagnostic Logs
No response
Beta Was this translation helpful? Give feedback.
All reactions