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

Suddently lost internet connection.. #11360

Closed
1 of 2 tasks
zeroarst opened this issue Mar 24, 2024 · 2 comments
Closed
1 of 2 tasks

Suddently lost internet connection.. #11360

zeroarst opened this issue Mar 24, 2024 · 2 comments

Comments

@zeroarst
Copy link

zeroarst commented Mar 24, 2024

Windows Version

Microsoft Windows [Version 10.0.19045.4170]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1

Distro Version

Ubuntu-20.04

Other Software

No response

Repro Steps

Until yesterday, my WSL2 worked fine with commands like curl, ping, ssh.. etc. Today those commands didn't work all of a sudden.

I can confirm ping 95.216.155.56 does work fine on Windows Git Bash.
image
curl -v google.com works fine on Windows Git Bash too.
image

I looked at solutions in 8358 and I have tried:

Disable ipv6

sudo sysctl -w net.ipv6.conf.all.autoconf=0 && sudo sysctl -w net.ipv6.conf.default.accept_ra=0 && sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1

Here are those tree values.
image

But still does not work with ping 95.216.155.56 command, just hang
image

With curl -v google.com command, failed too.
image

Check MTU value

Run PowerShell as administrator, execute command netsh interface ipv4 show subinterfaces, I get
image

Looks like value is 1500, which matches the eth0 mtu value 1500:
image

DNS configuratoin

I doubt this relates to DNS because pining ip address does not work.. but I still gave it a try..
Followed the guide from the reply.

sudo rm /etc/resolv.conf
sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
sudo bash -c 'echo "[network]" > /etc/wsl.conf'
sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf'
sudo chattr +i /etc/resolv.conf

Double check where they are correctly updated.
image
image

Then tried both ping and curl commands... does not work, and DNS is even worse, cannot resolve.
image

I don't know what else I can do.... please help..

Expected Behavior

curl, ping, ssh commands work.

Actual Behavior

curl, ping, ssh and all commands that connect to interenet don't work. Hang forever.

Diagnostic Logs

strace for ping command
strace for curl command

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

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. Thank you!

Open similar issues:

Closed similar issues:

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

@zeroarst
Copy link
Author

Actually I tried this solution and it works.. I don't know why.
https://stackoverflow.com/a/71756220/452486

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

1 participant