You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The guide of accessing networking apps have a few information missing:
I think the NAT networking mode is only for WSL2, but the document doesn't clarify this.
The first part "Identify IP address" is mostly duplicate with the "Default networking mode: NAT" part. It's better to put them inside the "NAT" part.
"Accessing Linux networking apps from Windows (localhost)": this does not work when I set localhostForwarding=false in .wslconfig (see Main WSL settings)
"Accessing Windows networking apps from Linux (host IP)":
In recent versions, the firewall is enabled by default. Without modifying Firewall rules, I cannot access Windows port.
The screenshot is using cat /etc/resolv.conf, which is different from the one shown in the text, and does not work with DNS tunneling enabled (this is by default enabled in recent versions).
The screenshot (the right side) says "Server running at http://127.0.0.1:5000", but the below section "Connecting via remote IP addresses" says you need to listen on 0.0.0.0. I tried and I found listening on 127.0.0.1 doesn't work.
"Accessing a WSL 2 distribution from your local area network (LAN)" part also cat /etc/resolv.conf for the IP address of the Windows machine as seen from WSL 2 (the WSL 2 VM)": this returns the incorrect IP when DNS tunneling is on (which is the default case).
@mattwojo let's remove this reference to cat /etc/resolv.conf and standardize to this command instead: ip route show | grep -i default | awk '{ print $3}'
Type of issue
Missing information
Feedback
The guide of accessing networking apps have a few information missing:
localhostForwarding=false
in.wslconfig
(see Main WSL settings)cat /etc/resolv.conf
, which is different from the one shown in the text, and does not work with DNS tunneling enabled (this is by default enabled in recent versions).0.0.0.0
. I tried and I found listening on 127.0.0.1 doesn't work.cat /etc/resolv.conf
for the IP address of the Windows machine as seen from WSL 2 (the WSL 2 VM)": this returns the incorrect IP when DNS tunneling is on (which is the default case).Page URL
https://learn.microsoft.com/en-us/windows/wsl/networking
Content source URL
https://github.com/MicrosoftDocs/wsl/blob/main/WSL/networking.md
Author
@mattwojo
Document Id
f9e21bfa-6316-7d45-3b34-834a78bcaf0f
The text was updated successfully, but these errors were encountered: