-
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 resolving doesn't work for local resources when connected to VPN #1881
Comments
The problem I see now is that on the Windows host the default DNS server is one from VPN ( This is what I see then I run
This is what I see when I run
|
For what it's worth, I frequently see similar problems with VPNs on native Ubuntu... It's possible to get this right on Linux, but it's not simple. |
@aseering you are right. It's possible to fix it on Linux with a kind of local proxying DNS. |
The dns resolution is a little weird in WSL. I tried for a while to get dnsmasq to work and get windows to actually use wsl>dnsmasq as a dns server for my windows system so that I could proxy wild card domains like *.dev but I can never seem to get windows to be able to reach dnsmasq get dns resolution to work. It definitely seems to me that how dns works between windows and wsl may have some weird issues. |
If you are connected to a VPN and lose connectivity within bash, please try the workaround posted here. It should work for Creators Update and above. Post Fall Creators Update, we will be looking at a better support for other VPN solutions. Thanks to @bradley101, who first pointed out the workaround. Also, marking this duplicate of #1350 |
why can't wsl (or bash.exe for that matter) generate resolv.conf in the same order as they appear for Windows apps? |
@macmiranda I think the problem is to keep it up to date when it changes in Windows when WLS session is already launched |
I don't think that workaround is available for this issue. I had the same issue using DirectAccess. The WSL just cannot resolve for remote resources at the VPN endpoint. My temporary solution is to look up IP in windows and then hack the WSL host. |
@sunilmut , the workaround doesn't work for everyone. Me included, any chance this can be prioritized given the issue has been open for +2 years now? |
A brief description
Can't get connected to the servers using the host names in the
*.mydomain.local
domain when machine is connected to VPN. When using the IP addresses everything works fine. When changing order of DNS servers in/etc/resolv.conf
it works fine as well.Expected results
I'm expecting I can connect to remote servers using the host names like
server1.mydomain.local
or justserver1
. I.e.ping server1.mydomain.local
should send the pings to the server.Actual results (with terminal output if applicable)
Your Windows build number
Version 1703 (OS Build 15063.13)
Steps / All commands required to reproduce the error from a brand new installation
/etc/resolv.conf
looks like thiswhere the first line is my local router's IP address and next 2 addresses are ones propagated from VPN
5. Disable the local DNS like this:
Required packages and commands to install
Just default Bash installation. Nothing special.
The text was updated successfully, but these errors were encountered: