WLS is not resolving internet addresses
pauloh@stanley:~$ wget www.google.com
--2022-10-22 22:27:19-- http://www.google.com/
Resolving www.google.com (www.google.com)... failed: Temporary failure in name resolution.
The resolve.conf file is being created automatically:
pauloh@stanley:~$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.26.178.1
The windows ipconfig:
PS C:\Users\pauloh> ipconfig /all
...
Ethernet Adapter vEthernet (WSL):
Connection-specific DNS Suffix . :
Description. . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
Physical Address . . . . . . . . : 00-25-5A-7A-7B-65
DHCP Enabled . . . . . . . . . . : No
Autoconfiguration Enabled. . . . : Sim
Link-local IPv6 Address. . . . . : fe80::875c:cda4:b862:9187%107(Preferred)
IPv4 Address. . . . . . . . . . : 172.26.178.1(Preferred)
Subnet Mask. . . . . . . . . . . : 255.255.240.0
Default Gateway. . . . . . . . . :
DHCPv6 IAID. . . . . . . . . . . : 1795167581
DHCPv6 Client DUID . . . . . . . : 00-01-00-01-25-CD-39-BF-C4-9D-ED-24-F8-F4
NetBIOS over Tcpip . . . . . . . : Enabled
If I edit /etc/ressolve.conf
and alter nameserver
to 8.8.8.8
or 1.1.1.1
I can reach to sites addresses. I can edit /etc./wsl.conf
and add generateResolvConf = false
to keep this behaviour. My problem happens when I access VPN that resolv.conf is much more complicated
I would like to undertand what's the relation with wsl's resolve.conf and the host's Ethernet adapter to fix wsl automatically configuration.
nslookup
on Windows?