I the old days, resolv.conf
was static and you edited it yourself.
Later on, the DHCP client would rewrite it, using some static entries and what it got from the DHCP lease.
These days, some distributions - like mine (Linux Mint 18.1) have a /etc/resolv.conf.d
mechanism with several subdirectories of scripts, and, well, I can't make heads and tails of it.
What's the right way, then, to...
- indicate that I want to use or not-use the DNS server(s) obtained in the DHCP lease?
- add fixed entries to resolv.conf, always or as a fallback when there's no DHCP-lease-obtained nameserver?
- make decisions about relative order in the file?
I don't mind writing some scripts of my own if I have to, I just don't want to "work against" the existing mechanism or do duplicate work.
resolvconf
in servers...http://unix.stackexchange.com/questions/286195/how-do-i-figure-out-where-wrong-local-dns-results-are-coming-from – Rui F Ribeiro Mar 09 '17 at 21:01dhclient
to ignore/replace DHCP DNS info; I'm not sure there's a mechanism in/etc/resolv.conf.d
to do this (but I don't use Mint, and don't have those scripts). – dirkt Mar 10 '17 at 07:43/etc/resolv.conf
is the localhost (which runs dnsmasq), so it's not clear to me how dnsmasq, the resolv.conf.d mechanism and the DHCP client interact. – einpoklum Mar 10 '17 at 07:48