Closed kanine closed 8 months ago
It's still not working. I don't know what they did but when I updated it killed the ability of wsl to broadcast to other local area computers.
Fixed the capital I issue in https://github.com/MicrosoftDocs/WSL/pull/1848
We've also helped improve this with Mirrored networking. Please see the updated docs here for more info:
Documentation Issue
The instructions on this page appear to be incomplete, and one step is inaccurate. Following these instructions closely I was unable to connect to a docker container running within a Ubuntu WSL image. The suggested improvements made connection possible.
Link to documentation page
https://learn.microsoft.com/en-us/windows/wsl/networking#accessing-a-wsl-2-distribution-from-your-local-area-network-lan
Suggested Improvements
The example shows this command:
netsh interface portproxy add v4tov4 listenport=4000 listenaddress=0.0.0.0 connectport=4000 connectaddress=172.30.187.232
However for this to work given this example, and allow access from other devices on the LAN the following Firewall Rules are required (based on the example of using port 4000):
New-NetFireWallRule -DisplayName 'WSL2' -Direction Outbound -LocalPort "4000" -Action Allow -Protocol TCP
New-NetFireWallRule -DisplayName 'WSL2' -Direction Inbound -LocalPort "4000" -Action Allow -Protocol TCP
Also the step to determine the WSL VM IP address is incorrect, it should say:
note the capital I.