You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have Cisco Anyconnect and OpenVPN installed, but not activated. If activated, I see the same behavior.
Repro Steps
I am trying to set up WSL1 in a new company network. However, DNS is completely broken for me, even if I override /etc/resolv.conf wsith a nameserver (e.g. nameserver 8.8.8.8), I will always get:
ping google.de
> ping: google.de: Temporary failure in name resolution
Expected Behavior
DNS resolution works.
Actual Behavior
nslookup will return an anwser only on second try:
1.3.17.0, 2.0.14.0, 2.0.15.0 will lead to the same issue
2.1.0.0, 2.1.1.0, 2.1.3.0 WSL1 won't start at all
Linux Distros Debian 12 and Ubuntu 22.04, both the same
Overriding /etc/resolv.conf -> no effect
host google.com
;; communications error to 8.8.8.8#53: timed out
google.com has address 142.251.209.142
google.com has IPv6 address 2a00:1450:4005:801::200e
google.com mail is handled by 10 smtp.google.com
modifying /etc/gai.conf so that IPv4 is preferred:
#For sites which prefer IPv4 connections change the last line to
precedence ::ffff:0:0/96 100
...
# For sites which use site-local IPv4 addresses behind NAT there is
# the problem that even if IPv4 addresses are preferred they do not
# have the same scope and are therefore not sorted first. To change
# this use only these rules:
#
scopev4 ::ffff:169.254.0.0/112 2
scopev4 ::ffff:127.0.0.0/104 2
scopev4 ::ffff:0.0.0.0/96 14
has no effect
When I am connected via OpenVPN or CiscoVPN, I see the same issues:
> # /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: files systemd
group: files systemd
shadow: files systemd
gshadow: files systemd
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
dig @192.9.200.66 google.org
;; communications error to 192.9.200.66#53: timed out
; <<>> DiG 9.18.24-1-Debian <<>> @192.9.200.66 google.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7378
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;google.org. IN A
;; ANSWER SECTION:
google.org. 300 IN A 216.239.32.27
;; Query time: 49 msec
;; SERVER: 192.9.200.66#53(192.9.200.66) (UDP)
;; WHEN: Wed Feb 28 08:49:32 CET 2024
;; MSG SIZE rcvd: 44
netstat -rn | more (with metrics, with Cisco VPN on)
none 224.0.0.0/4 dev eth0 proto unspec metric 256
none 255.255.255.255 dev eth0 proto unspec metric 256
none default via 192.9.200.70 dev eth1 proto unspec metric 0
none 192.9.200.0/24 dev eth1 proto unspec metric 256
none 192.9.200.211 dev eth1 proto unspec metric 256
none 192.9.200.255 dev eth1 proto unspec metric 256
none 224.0.0.0/4 dev eth1 proto unspec metric 256
none 255.255.255.255 dev eth1 proto unspec metric 256
none 127.0.0.0/8 dev lo proto unspec metric 256
none 127.0.0.1 dev lo proto unspec metric 256
none 127.255.255.255 dev lo proto unspec metric 256
none 224.0.0.0/4 dev lo proto unspec metric 256
none 255.255.255.255 dev lo proto unspec metric 256
none 224.0.0.0/4 dev eth2 proto unspec metric 256
none 255.255.255.255 dev eth2 proto unspec metric 256
none 224.0.0.0/4 dev eth3 proto unspec metric 256
none 255.255.255.255 dev eth3 proto unspec metric 256
none 224.0.0.0/4 dev eth4 proto unspec metric 256
none 255.255.255.255 dev eth4 proto unspec metric 256
none 224.0.0.0/4 dev wifi0 proto unspec metric 256
none 255.255.255.255 dev wifi0 proto unspec metric 256
none 224.0.0.0/4 dev wifi1 proto unspec metric 256
none 255.255.255.255 dev wifi1 proto unspec metric 256
none 224.0.0.0/4 dev wifi2 proto unspec metric 256
none 255.255.255.255 dev wifi2 proto unspec metric 256
none 224.0.0.0/4 dev eth5 proto unspec metric 256
none 255.255.255.255 dev eth5 proto unspec metric 256
The text was updated successfully, but these errors were encountered:
Sieboldianus
changed the title
DNS resolution broken in WSL, even with resolv.conf override. DNS in WSL2 works.
DNS resolution broken in WSL1, even with resolv.conf override. DNS in WSL2 works.
Feb 28, 2024
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!
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!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Windows Version
Windows 11 Pro 22631.3155
WSL Version
2.0.15.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.133.1-1
Distro Version
Debian 12 (bookworm)
Other Software
I have Cisco Anyconnect and OpenVPN installed, but not activated. If activated, I see the same behavior.
Repro Steps
I am trying to set up WSL1 in a new company network. However, DNS is completely broken for me, even if I override
/etc/resolv.conf
wsith a nameserver (e.g.nameserver 8.8.8.8
), I will always get:Expected Behavior
DNS resolution works.
Actual Behavior
nslookup will return an anwser only on second try:
Note:
apt update
andapt install
do always work, for some reason; with some delay though.Diagnostic Logs
I tested different things:
WSL Kernel Versions
1.3.17.0
,2.0.14.0
,2.0.15.0
,2.1.0.0
,2.1.1.0
,2.1.3.0
1.3.17.0
,2.0.14.0
,2.0.15.0
will lead to the same issue2.1.0.0
,2.1.1.0
,2.1.3.0
WSL1 won't start at allLinux Distros
Debian 12
andUbuntu 22.04
, both the sameOverriding
/etc/resolv.conf
-> no effectIPv6 seems to work:
Modifying
/etc/wsl.conf
and
both have no effect.
modifying
/etc/gai.conf
so that IPv4 is preferred:has no effect
When I am connected via OpenVPN or CiscoVPN, I see the same issues:
If I do
nslookup
interactively, the timeout will only appear on the first try (I assume all else are cached afterwards):I went through all the recommendations in Troubleshooting Windows Subsystem for Linux, especially Troubleshooting DNS in WSL, without success.
These are some logs for debugging:
ipconfig /all
ipconfig /all | findstr "Gateway"
Get-NetFirewallProfile -PolicyStore ActiveStore
nano /etc/nsswitch.conf
dig @192.9.200.66 google.org
netstat -rn | more
(with metrics, with Cisco VPN on)ip route show
Get-DnsClient
nslookup
withset d2
(debug)arp -a
The text was updated successfully, but these errors were encountered: