Network not working
name: Bug report about: Report a bug on Windows Subsystem for Linux title: 'Network not working' labels: 'bug' assignees: ''
Environment
Windows build number: Microsoft Windows [Version 10.0.19041.329]
Your Distribution version: Debian GNU/Linux 10 \n \l
Whether the issue is on WSL 2 and/or WSL 1: Linux version 4.19.104-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Feb 19 06:37:35 UTC 2020
Same problem in WSL 1 and WSL 2
Steps to reproduce
I just do sudo apt update
Expected behavior
Get packages updates
Actual behavior
After waiting for network timeouts, more or less 10 seconds, this is the output for sudo apt update:
luke@DESKTOP-U264O87:~$ sudo apt update
Err:1 http://deb.debian.org/debian buster InRelease
Temporary failure resolving 'deb.debian.org'
Err:2 http://security.debian.org/debian-security buster/updates InRelease
Temporary failure resolving 'security.debian.org'
Err:3 http://ftp.debian.org/debian buster-backports InRelease
Temporary failure resolving 'ftp.debian.org'
Err:4 http://deb.debian.org/debian buster-updates InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://ftp.debian.org/debian/dists/buster-backports/InRelease Temporary failure resolving 'ftp.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
luke@DESKTOP-U264O87:~$
Obviously with this fail, sudo apt upgrade returns nothing to upgrade.
What I already tried
-
Deleted symlink in
/etc/resolv.confpointing to that in/run/resolvconf/resolv.conf -
Created
/etc/wsl.conffile to stop auto-generation of/etc/resolv.confwhich i edited putting onlynameserver 8.8.8.8 -
Set up eth0 interface by getting gateway ip from vEthernet(WSL) card by this PowerShell script:
$gateway_ips = Get-NetIPAddress -InterfaceAlias "vEthernet (WSL)" | select IPAddress
$gateway_ip = $gateway_ips[1].IPAddress
Write-Output "Gateway (local WSL adapter) IP is: $gateway_ip"
because with my default network gateway at 192.168.1.1 it didn't work.
and then I configured eth0 interface with:
sudo ip a add 172.23.64.1/255.255.240.0 dev eth0
sudo ip route add default via 172.23.64.1 and
ip link set dev eth0 up
so that now ip r returns:
default via 172.23.64.1 dev eth0
172.23.64.0/20 dev eth0 proto kernel scope link src 172.23.64.1
but Internet is still not working.
/dupe #5256
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!
I think that's not the same issue as #5256
because if i try to do
ping -c 4 172.217.23.174 or any other IP address, like 127.0.0.1 or localhost too, i get
connect: Network is unreachable
so that's not only a DNS problem, but a network problem, too.
In addition I don't use any proxies, VPNs, fixed IPs. My only firewall is windows firewall, where I allowed manually WSL.
I tried disabling temporarily Windows Firewall to see if it was the problem, but it didn't work as well.
I reinstalled the distro, then disabled and re-enabled WSL, and I reinstalled the whole Windows to be 100% sure it wasn't something corrupted in downloads or OS
Same problem as #5437 Disabling swap workaround just works