microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.42k stars 823 forks source link

Can't connect to internet without connecting to a vpn #12000

Open eloraa opened 1 month ago

eloraa commented 1 month ago

Windows Version

Microsoft Windows [Version 10.0.22631.4037]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-microsoft-standard-WSL2

Distro Version

Debian GNU/Linux 12 (bookworm) on Windows 10 x86_64

Other Software

No response

Repro Steps

I tried Windows, WSL, and distro clean installation, so I don't know how to reproduce it.

Expected Behavior

I should be able to connect to the internet without using a VPN

Actual Behavior

I can't access the internet from WSL without using a VPN. The ping command works, but other activities don't.

image

Diagnostic Logs

C:\Users\elora>cmd.exe --version Microsoft Windows [Version 10.0.22631.4037] (c) Microsoft Corporation. All rights reserved.


➜ elora traceroute www.microsoft.com traceroute to www.microsoft.com (23.39.182.51), 30 hops max, 60 byte packets 1 172.17.224.1 (172.17.224.1) 0.744 ms 0.685 ms 0.652 ms 2 192.168.0.1 (192.168.0.1) 2.113 ms 2.083 ms 2.050 ms 3 10.199.0.1 (10.199.0.1) 8.268 ms 8.239 ms 4 172.16.101.1 (172.16.101.1) 2.259 ms 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 *

strace: https://gist.github.com/eloraa/790255be43a89969e877fff1a58eebd9

network logs: WslNetworkingLogs-2024-09-06_11-42-59.zip

### Tasks
- [ ] internet doesn't work without a VPN
github-actions[bot] commented 1 month ago

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
Detected appx version: 2.2.4.0
optional-components.txt not found

eloraa commented 1 month ago

bump

CatalinFetoiu commented 2 weeks ago

thanks for reporting the issue and sending logs In the windows packet capture I did not see traffic coming from WSL (I did not see traffic with source 172.17.224.86, which is the IP assigned in Linux). I also did not see traffic with the IP from your screenshot (217.160.0.201)

to make sure I understand the issue correctly, does curl google.com work when the VPN is connected? and it does not work when the VPN is disconnected? could please collect a new set of networking logs where you do the following? start networking logs have the VPN disconnected curl google.com in WSL, confirm it does not work connect the VPN curl google.com in WSL, confirm it works stop networking logs

some other things that would be useful to know: what is the name of the VPN product you are using? does the problem happen when using networkingMode=mirrored?

eloraa commented 2 weeks ago

thanks for reporting the issue and sending logs In the windows packet capture I did not see traffic coming from WSL (I did not see traffic with source 172.17.224.86, which is the IP assigned in Linux). I also did not see traffic with the IP from your screenshot (217.160.0.201)

I'm not sure about this. I just ran everything described in the readme and uploaded it. to make sure I understand the issue correctly, does curl google.com work when the VPN is connected? and it does not work when the VPN is disconnected? could please collect a new set of networking logs where you do the following? start networking logs have the VPN disconnected curl google.com in WSL, confirm it does not work connect the VPN curl google.com in WSL, confirm it works stop networking logs

I have already provided the screenshots. The top one is without a VPN, and the bottom one is with a VPN, which is working. I will include logs for both situations. some other things that would be useful to know: what is the name of the VPN product you are using? does the problem happen when using networkingMode=mirrored?

Any type of VPN works. It doesn't matter which one. Also, no, the problem doesn't occur when using networkingMode=mirrored