Web lists-archives.com

Re: Why does resolv.conf keep changing?




On Fri, Oct 27, 2017 at 01:18:58PM +0100, Darac Marjal wrote:
> 
> Who's saying it must be installed? Maybe I've missed something, but I think
> the consensus in this discussion was that if you want your resolv.conf to be
> unmanaged/static/administrator-controlled, then don't have resolvconf
> installed. If you have resolvconf installed, then what's the point of
> neutering it with a command?
> 
The suggestion was made several times that if I wanted to prevent
/etc/resolv.conf being changed that I needed to first install resolvconf
(this system has never had resolvconf installed) and then configure
resolvconf to not change /etc/resolv.conf.

After much investigation and troubleshooting it turned out to be
dhclient that was modifying /etc/resolv.conf.

Think about that for a minute.  The mere action of an interface (any
interface on the system) obtaining a DHCP lease is sufficient to have
dhclient think it needs to obliterate my manual networking configuration
with settings from the DHCP server.  It clearly assumes that it is the
only thing involved in configuring networking on the system.  This
despite the fact that the system in question has another static
interface onto my LAN and runs bind for my network (which is why I felt
strongly "nameserver 127.0.0.1" is an important option that should be
left alone in /etc/resolv.conf).

In the end it turns out that "resolvconf not installed =/=>
/etc/resolv.conf will remain unmanaged".

> (I realise that there are some packages that come with, say, ENABLED=no in
> /etc/default, but that's usually there because sensible defaults are
> difficult, and the package needs to be configured before use. Not so with
> resolvconf).
> 
Certainly I can understand an argument for resolvconf respecting or not
respecting certain conventions as defaults.  However, the whole point of
the thread that I started was how to figure out what was changing
/etc/resolv.conf when resolvconf wasn't installed in the first place.
It may have reasonable defaults but the available methods for making it
do what I need it to do for my particular situation are inadequate and
involve way too much work.

I mean, even a simple line like this at the top would be such a help:

# This was automatically generated by dhclient (Oct 25 19:03:45 EDT)
# Any changes will be overwritten
# To make this stop consult dhclient-script(8)

In any event, when I get some time in the next days I will update some
pages related to this on the Debian wiki and possibly file a few
wishlist bugs.

Regards,

-Roberto

-- 
Roberto C. Sánchez