ArchWSL icon indicating copy to clipboard operation
ArchWSL copied to clipboard

No longer have access to internet within WSL

Open PunkPhysicist opened this issue 3 years ago • 8 comments

Describe the issue I've had Arch installed for some time. Lately, I no longer seem to have internet access (maybe due to a Windows update?). I tried updating ArchWSL to the latest version but it didn't help. Unlike https://github.com/yuk7/ArchWSL/issues/140, my /etc/resolv.conf file looks line (see screenshot)

To Reproduce Start Bash and try to access the internet, e.g. by Pacman update (times out) or ping ("Operation not permitted" message)

Expected behavior Internet access

Screenshots Screenshot 2021-09-02 143737

Enviroment:

  • Windows build number: [e.g. 10.0.17134.228] (Type ver at a Command Prompt)
  • Security Software: [e.g. ESET Internet Security]
  • WSL version 1/2: WSL2
  • ArchWSL version: 21.8.28.0
  • ArchWSL Installer type zip/appx/other clean/update [e.g. appx update]: zip/update
  • Launcher version [e.g. 19030700]: 20013000

PunkPhysicist avatar Sep 02 '21 18:09 PunkPhysicist

ping may requires root permission, could you try run ping with root? and also run cat /proc/sys/net/ipv4/ping_group_range to double check.

tyan-boot avatar Sep 26 '21 06:09 tyan-boot

not related to ping root permission...

Default Version: 2 WSL version: 0.47.1.0 Kernel version: 5.10.60.1 WSLg version: 1.0.29 Windows version: 10.0.22000.194

no internet, but it seems it's able to resolve dns queries, and alas no internet traffic.

brumle80 avatar Oct 12 '21 21:10 brumle80

It also happens on my PC sometimes. But it will be fine after a computer reboot.

It reboot not fix it, try to use Network Reset in Windows Setting It will reinstall all the adaptor includes Hyperv's.

8ar10der avatar Oct 13 '21 01:10 8ar10der

try ifconfig eth0 mtu 1350

qycyfjy avatar Jan 03 '22 18:01 qycyfjy

I have the same trouble and temporally fix my problem inserting nameserver 8.8.8.8 in the last line of /etc/resolv.conf each time I turn up my laptop

jefer94 avatar Feb 06 '22 23:02 jefer94

I had this happen on a couple of machines, the fix was generally to run netsh winsock reset from the windows side. It is technically possible to hardcode the dns ns as mentioned above, but it seems like sometimes even that fails.

Jiyuu avatar Mar 04 '22 00:03 Jiyuu

I'm having something like this problem too. Already tried the nameserver option and didn't work.

I got a download speed of 2Mbit/s with speedtest-cli, but on ubuntu, it goes above 300 Mbit/s. After messing around, I'm getting ~300 Mbit/s on Arch too, however, some commands fail to download packages over the internet.

Cargo/Rust was very slow and it had to retry several times NPM doesn't work at all, but Yarn did work with some packages only asdf worked fine, even to download nodejs and ruby

The netsh commands sometimes work but is painful to have to restart the pc every time.

luismramirezr avatar Apr 11 '22 04:04 luismramirezr

In my case netsh doesn't not work for me

@yuk7

jefer94 avatar Apr 11 '22 16:04 jefer94