microsoft / WSL

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

No internet connectivity from WSL2 / Ubuntu or Kali linux #6647

Closed alejandroburgos97 closed 3 years ago

alejandroburgos97 commented 3 years ago

Hi, I am having connection problems, when I try to ping from Ubuntu or from Kali linux the following appears: 4 packets transmitted, 0 received, 100% packet loss, time 1071ms

I already tried temporarily disabling the Firewall to see if that would fix it, but I still don't have internet access I also tried various things that I found on forums, like this, but nothing seems to work

# Fix network issues
# Delete auto-generated files
[root @ PC-NAME user] # rm /etc/resolv.conf || true
[root @ PC-NAME user] # rm /etc/wsl.conf || true

# Enable changing /etc/resolv.conf
# Enable extended attributes on Windows drives
[root @ PC-NAME user] # cat << EOF> /etc/wsl.conf
[network]
generateResolvConf = false

[automount]
enabled = true
options = "metadata"
mountFsTab = false
EOF

# Use google nameservers for DNS resolution
[root @ PC-NAME user] # cat << EOF> /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
EOF

/etc/wsl.conf
[network]
generateResolvConf = false

Exit Linux WSL

cmd as admin:
wsl --shutdown
netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig / flushdns

Windows Search> Network Reset

Restart Windows

Does anyone know what else could work? I don't know if it contributes something, but I tried to ping from cmd to the ip address that appears with ifconfig in kali linux and there was ping, however, on the contrary, there was no result, that is, from the kali terminal to the ip address listed in Ethernet adapter vEthernet (WSL):

salverde commented 3 years ago

I seem to be having the exact same issues here! Also gone thru the gamut of "resolutions" and I as well still face networking issues! I am on Alpine 3.12 and Debian 9 (stretch).

I thought the issue was with my VPN (Checkpoint / Endpoint) but that doesn't seem to be the case... I've also reinstalled (WSL) and repaired it! Could it have something to do with the Windows Firewall? I believe it has something to do with DNS and resolving hosts?? I could be wrong but that is where my debugging has led me...

@anyone PLEASE ADVISE??

therealkenc commented 3 years ago

/dupe #5336

ghost commented 3 years ago

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!