-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DNS lookup broken if original DNS server goes down but has already been changed in Windows #1028
Comments
The workaround is to note that The other workaround is to leave your router listed as the first DNS resolver, then put the OpenDNS resolvers in as second and third (using DHCP setup on the router or perhaps Windows network setup). Or you could edit In no sense do the workarounds mitigate the core problem, which is that DNS resolver is about the only core networking functionality of WSL (routing, firewall, adapter configuration, etc) that isn't handled by the Windows side in real time. |
Apologize the delay in response here. It is true that |
I have a similar issue to this with regard to VPNs whereas based on the order of the DNS servers in /etc/resolv.conf anything after the first one doesn't fully work. So for example, I have my normal internet network, and I'm connected to my work VPN via split tunnel. Therefore, all my internet traffic still goes through my network and any VPN traffic will go through that, and of course the VPN traffic would have its own DNS server. This all works fine in Windows itself, but inside the Ubuntu Bash, things are not as happy. the /etc/resolv.conf lists my local dns server for internet, and the couple DNS servers from my VPN. the local dns is first and the others follow it. When I do a 'nslookup or dig' on a VPN only hostname say, vmatwork.myworkvpn.com, it will properly cycle through all the DNS servers and provide the result. However, if I do a 'ping', 'ssh' or anything else using that same hostname, the DNS resolution fails. It basically only tries the first DNS server, and bails out. If I modify and move the VPN's DNS servers to be first in /etc/resolv.conf, it will now allow me to use 'ping', 'ssh', etc against the VPN hostname. However, when doing that, my internet DNS now fails because now it's not first. While this workaround lets me utilize my VPN's internal hostnames, it results in all external (internet) hostnames to fail DNS resolution. As mentioned, this is not a problem anywhere else in Windows 10. If I use cygwin, both networks work as expected. It's only using Bash for Windows that this is a problem. |
Experienced this with build 14905.
My router's DNS started to stop responding to dns lookups so instead of restarting it I set my DNS server from
192.168.1.1
to OpenDNS208.67.222.222
,208.67.220.220
in Windows.Ubuntu for Windows seemed to still be using the old DNS as all lookups would fail. It wasn't until I disabled and then re-enabled the Ethernet adapter in Windows that I was able to have DNS lookups working again in the shell.
The text was updated successfully, but these errors were encountered: