-
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
Manual override of /etc/resolv.conf for custom DNS setups #1055
Comments
Since About the only way to fix it (until more options become available) is to tell the Windows side to use your custom name resolver, or at least put it first. With a bit of luck the autogenerated Or I suppose you could put a script in .bashrc or something that overwrites the autogenerated resolv.conf with one more to your liking every time you log in, until such time as WSL gives more options. (Actually it would have been nice for a failure in the public resolver to result in fall through to the next resolver on the list. Not sure why that doesn't happen, though there is probably a good explanation somewhere, like perhaps the public resolver actually giving a result instead of failure.) |
@gjonespf Please see #1028 on how WSL currently does DNS and our thoughts around it (and the issue with not keeping DNS entry not in sync between Windows and WSL). In short, and, also as @rodrymbo points out, the way currently to manage your |
@sunilmut Yeah, for now I've just removed all public DNS from the Windows side and run everything with caching through custom local DNS server/proxy. It's a little simpler to debug that way. |
anyone know how this is fixed in the insider builds? |
|
Using:
Microsoft Windows [Version 10.0.14393]
Currently, /etc/resolv.conf is autogenerated - which is perfect for most situations. I'm annoying, however, and run a local DNS server on my dev boxes to allow custom DNS overrides. So for
ipconfig /all
I get several DNS servers, e.g. one public:
8.8.8.8
and one custom loopback
10.99.1.1
These are autogenerated into the resolv.conf:
nameserver 8.8.8.8
nameserver 10.99.1.1
search Home
Problem is, when I try to resolve any custom domain, it'll resolve using the first one and fail. I kinda want to remove the first nameserver, and just use my custom local one which also does caching from public servers:
nameserver 10.99.1.1
search Home
So ultimately I need some way of overriding /etc/resolv.conf autogeneration, or disabling it.
I've tried using resolvconf, expecting this may be used to update the conf:
Have also looked into modifying:
/etc/network/interfaces.d/eth0.cfg
auto eth0
iface eth0 inet dhcp
dns-search Home
dns-nameservers 10.99.1.1
Have also tried modifying the dhcpclient stuff, no avail.
The text was updated successfully, but these errors were encountered: