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
On the host machine, open an HTTP server via python3 -m http.server. (Any application that opens an HTTP server works. )
In WSL, run cat /etc/resolv.conf to get the IP address of the host machine. (I got 172.21.144.1. )
On the host machine, in a new powershell, run curl http://localhost:8000 and curl http://172.21.144.1:8000. Both commands work fine and print a response.
In WSL, run curl http://cn.bing.com and curl http://172.21.144.1:8000.
Expected Behavior
Both commands run in WSL print the corresponding responses.
Actual Behavior
Only the first command (requesting cn.bing.com) runs fine. The second (requesting the host machine) does not. This means WSL can access the Internet but not the host machine (through the IP in /etc/resolv.conf).
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered:
Windows Version
Microsoft Windows [Version 10.0.19045.3208]
WSL Version
1.2.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.90.1
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
On the host machine, open an HTTP server via
python3 -m http.server
. (Any application that opens an HTTP server works. )In WSL, run
cat /etc/resolv.conf
to get the IP address of the host machine. (I got172.21.144.1
. )On the host machine, in a new powershell, run
curl http://localhost:8000
andcurl http://172.21.144.1:8000
. Both commands work fine and print a response.In WSL, run
curl http://cn.bing.com
andcurl http://172.21.144.1:8000
.Expected Behavior
Both commands run in WSL print the corresponding responses.
Actual Behavior
Only the first command (requesting
cn.bing.com
) runs fine. The second (requesting the host machine) does not. This means WSL can access the Internet but not the host machine (through the IP in/etc/resolv.conf
).Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: