-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL 2 Internet connection doesn't work until I connect to VPN #5784
Comments
I once had the opposite problem: WSL2 lost internet connection when connected to WIreGuard VPN. I solved the problem by editing the "AllowedIPs“ field of WireGuard conf: [Peer] Hope it will help you. |
Thanks @wushangwei it worked |
Run below from powershell in admin mode for cisco any connect vpn. Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 4000 |
This worked for us just now! Awesome :) No idea why though, 0.0.0.0/0 should be identical to 0.0.0.0/1 and 128.0.0.0/1??? |
If you are using WireGuard VPN, this might help: #5784 (comment) |
Environment
To make internet connection working on WSL2 machine, I have to connect to VPN (Wire Guard) first, otherwise it doesn't work
This wasn't the case, it was working fine (with TunSafe VPN client) installed without any issue, I believe this issue surfaced after the latest windows update a couple of days ago. I am not sure what causing this problem, windows update is the only thing changes without me doing anything.
Steps to reproduce
/etc/resolv.conf
and change the nameserver from172.20.144.1
to something like1.1.1.1
or8.8.8.8
WSL logs: I tried to follow the steps but I didn't get the last option/tab which I can collect the logs
Expected behavior
I should have internet connection on my WSL2 machine
Actual behavior
As described, I have to connect to VPN server and change nameserver to make it work
More data
Network adapters
Wi-Fi Adapter sharing settings, I already tried turning this on/off states
WSL Adapter
Default Switch adapter
Hope this helps to solve the problem that I am having as I need WSL for my web development work
The text was updated successfully, but these errors were encountered: