selected snippets from https://wiki.debian.org/NetworkConfiguration#Defining_the_.28DNS.29_Nameservers
You can make /etc/resolv.conf immutable, so it cannot be changed by any package:
openresolv lets you tell it to do nothing whenever some daemon tries to modify resolv.conf, by putting resolvconf=NO in the /etc/resolvconf.conf file. (Note: this is not the /etc/resolv.conf file!)
The setting you want is: supersede domain-name-servers 12.34.56.78, 12.34.56.79
And my personal favorite:
echo ‘make_resolv_conf() { :; }’ > /etc/dhcp/dhclient-enter-hooks.d/leave_my_resolv_conf_alone; chmod 755 /etc/dhcp/dhclient-enter-hooks.d/leave_my_resolv_conf_alone
How the fuck did we get here? Aren’t these docs an admission that it’s a clusterfuck?
That page says don’t forget the “s” on dns-nameservers when using /etc/networking/interfaces, but https://manpages.debian.org/trixie/resolvconf/resolvconf.8.en.html omits it!
Interface configuration and DNS resolution are managed by different systems. Their file structures are different. It’s been like this for many decades, and changing it is just not worth breaking existing systems.
dhcpcd overwrites is. I only have one static address, but DHCP does other stuff too it seems
IMO this is largely Debian-specific: this distro seems to hold backward comaptibility in very high regard, so any problem is bound to have a multitude of solutions. In addition, the Debian Wiki is not as well maintained as you-know-whose.
I see nothing untoward here.
Except maybe that last sentence, what “s” are you talking about (fwiw, the man page that comes with an installed package should™ be the ultimate authority)?


