WSL: Internet not working - Network Unreachable
Windows Build Number
10.0.19042.928
WSL Version
- WSL 2
- WSL 1
Kernel Version
Linux version 5.4.72-microsoft-standard-WSL2 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Oct 28 23:40:43 UTC 2020
Distro Version
Ubuntu 20.04
Other Software
Docker Desktop (Windows), version 3.3.1
Repro Steps
Open Ubuntu
Run following commands:
sudo apt update
ping google.com
ping 8.8.8.8
ping 1.1.1.1
ping localhost
ping 127.0.0.1
ping 192.168.0.1
Expected Behavior
The commands will work, and connection to the internet will not work. The internet works outside of WSL. I do not have any 3rd party AV software installed.
Actual Behavior
PFA the terminal output Terminal.txt
Diagnostic Logs
No response
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 15 (1 by maintainers)
I do not use any VPN.
Further investigation reveals that internet does not work with Debian (WSL2) and Ubuntu(WSL2). However, on switching these distros to WSL1, the internet works. Changing them back to WSL2, again stops the internet from working. Hence, it appears as if the internet issue is exclusive to distros running on WSL2 However, this is not a viable option as Docker Desktop integration requires WSL2.
I have the same problem after updating to 21H2.
Windows Version: 19044.1706
No VPN or Antivirus (besides Defender). Works in WSL 1.
Tried every fix I found:
Nothing helped…
Attached the networking debug logs:
networking.bat
wsl.zip
I have the same problem, and do not use VPN… shutting down WSL2 and restarting doesn’t seem to help. Restarting windows does (most of the times)
Let me guess…
You are using a VPN?
If yes, use something else than WSL2… I am on the same boat and Microsoft doesnt care about this problem.
You will find threads back some months /years with people with the exact same problem.
I cant use WSL2 because of VPN and all the solutions found here doesnt work for everybody.
I have the same problem, as long as I switch to wsl1 via
wsl --set-version, there is no problem