resolv.conf questions

Paul Smith paul at mad-scientist.net
Thu Aug 8 21:54:44 UTC 2019


On Thu, 2019-08-08 at 17:49 -0300, Tomas Zubiri wrote:
> https://askubuntu.com/questions/662863/manually-edit-dns-in-ubuntu-14-04
> 
> Dear Ubuntu developers, /etc/ files are user interfaces, stop
> breaking them.

This is too simple unfortunately.

Back in the mists of time, /etc/resolv.conf was a user-modifiable file
and when you set up a new system (typically the size of a room, or a
large table, or even a big suitcase that sat under your desk) you'd
edit this file by hand to set your DNS server.  And it virtually never
changed, so it was fine.

Then we started to deploy large numbers of systems and we wanted a
centralized way to manage this info (along with IP addresses etc.)  So
DHCP was born, and now systems asked out on the network for a server to
provide these details.  No longer were these files expected to be
edited manually.  This was 30+ years ago, mind you!

Maybe, back when DHCP started, we should have addressed this problem. 
Maybe the C resolver should have been changed to look for
/etc/resolv.conf and if it didn't exist, it would look somewhere else
for a dynamically created file.  But we didn't.

These days it's even more complicated: not only do we have desktops but
laptops, which can switch IP addresses and DNS servers by walking from
one side of a room to another.  Plus we have VPNs, where there are DNS
servers that you want to ask for systems you can access over the VPN,
and other DNS servers you want to ask about systems on your local
network, and potentially other servers you can ask about google.com
etc.

So there are various ways to manage it.  In fact I agree there are _too
many_ ways, and the one that seems to be "winning" (systemd-resolved)
has serious (IME) deficiencies.  I wish we'd stopped at "run a local
dnsmasq server" because that worked just fine.

If you want to go back to the days when you hand-edited your
resolv.conf file you can do that by disabling all the extra features. 
But I sincerely doubt many people (especially people using laptops)
want to do that.





More information about the ubuntu-users mailing list