Skip to content
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

WSL2 suddendly stopped to reach the network #7822

Closed
1 of 2 tasks
jonascarfantan opened this issue Dec 11, 2021 · 6 comments
Closed
1 of 2 tasks

WSL2 suddendly stopped to reach the network #7822

jonascarfantan opened this issue Dec 11, 2021 · 6 comments

Comments

@jonascarfantan
Copy link

Version

10.0.22000.348

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.60.1

Distro Version

any Distrib but i use Debian most of the time

Other Software

No response

Repro Steps

sudo ping google.com

Expected Behavior

send paquet to google

Actual Behavior

network unreachable with wsl2 but works fine with wsl1

Diagnostic Logs

Things i have tried
wsl --shutdown

ipconfig:

Carte réseau sans fil Wi-Fi :

Suffixe DNS propre à la connexion. . . :

Adresse IPv6. . . . . . . . . . . . . .: 2a04:cec0:1122:96c9:e4c4:5606:68f6:36ea

Adresse IPv6 temporaire . . . . . . . .: 2a04:cec0:1122:96c9:ad16:4324:978b:c5ee

Adresse IPv6 de liaison locale. . . . .: fe80::e4c4:5606:68f6:36ea%7

Adresse IPv4. . . . . . . . . . . . . .: 192.168.43.121

Masque de sous-réseau. . . . . . . . . : 255.255.255.0

Passerelle par défaut. . . . . . . . . : fe80::683f:a2ff:fe5c:72fb%7

192.168.43.1

Carte Ethernet Connexion réseau Bluetooth :

Statut du média. . . . . . . . . . . . : Média déconnecté

Suffixe DNS propre à la connexion. . . :

Carte Ethernet vEthernet (WSL) :

Suffixe DNS propre à la connexion. . . :

Adresse IPv6 de liaison locale. . . . .: fe80::6046:a673:811d:76ac%22

Adresse IPv4. . . . . . . . . . . . . .: 172.17.64.1

Masque de sous-réseau. . . . . . . . . : 255.255.240.0

Passerelle par défaut. . . . . . . . . :
netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns
Reboot pc a lot of times

Disabled Ipv6 but nor windows nor wsl have reached network without IPv6
Disabled the windows firewall
disabled fast boot
Uninstall install WSL
Upgrade to Windows 11 (and i regret it...)

sudo nano /etc/resolv.conf
Remove line out the nameserver nameserver 17...
add this new line nameserver 8.8.8.8
sudo nano /etc/wsl.conf
Paste the following in

So i can't figure what is happening to my laptop, if you have any idea of what can i try to fix it I will appreciate it.

@dckface
Copy link

dckface commented Dec 12, 2021

I'm having similar problem, which might be related. For me, what helps is to deactivate Windows Firewall. I've submitted it in separate issue on #7823

@jonascarfantan
Copy link
Author

Unfortunately deactivate the firewall doesn't work for me.

@danchitnis
Copy link

This solution works, but every time wsl is restarted the nameserver is automatically regenerated. seems that the /etc/wsl.conf has no effect.

@janovesk
Copy link

Have a look at the routing table, @jonascarfantan. Use route print. Make sure the default route for the IP assigned to the network inferface in your Linux distro is to the WSL virtual network adapter in Windows. Make sure the route with the lowest metric moves traffic to WSL virtual network adapter.

I wrote a long post about it https://janovesk.com/wsl/2022/01/21/wsl2-and-vpn-routing.html. In my scenario the route is messed up by a VPN. I don't know if you are running one, but double check the routing table.

@Codym48
Copy link

Codym48 commented Jan 11, 2023

@janovesk, your blog post saved me a ton of pain and suffering (and taught me something in the process). Thank you for the detailed description. I scripted it up here: https://github.com/Codym48/fix-wsl2-vpn

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants