Debian server DNS bogosity
Note: I’m running my Raspberry Pi as a server, and NetworkManager
is not installed.
I discovered that if you want to manually assign search
and nameserver
entries in your /etc/resolv.conf file, you can’t just add the relevant entries to static entry in /etc/network/interfaces:
1
2
3
4
5
6
7
|
auto eth0
iface eth0 inet static
address 192.168.1.123
netmask 255.255.255.0
gateway 192.168.1.1
dns-search devolve.net
dns-nameservers 8.8.4.4 8.8.8.8
|
For some unknown reason, the resolvconf utility will still attempt to query an upstream DHCP server to get additional name service data. I don’t know why it works this way, I believe it should be hands-off if you’ve specified static
in your interfaces file. I finally found that dhcpcd was called to get the info, and added the following line to /etc/dhcpcd.conf to disable actions relating to eth0:
1 |
denyinterfaces lo* eth0
|
I suppose if I wanted additional interfaces to work properly using dhcp, I’d have to get rid of all this and configure each interface manually via NetworkManager
or wicd
.