I am using Raspbian with a static setup in /etc/network/interfaces. I have read from multiple credible sources that the /etc/resolv.conf file is populated by other software on the system, commonly DHCP.
To test this, in my /etc/dhcp/dhclient.conf I tried adding the following
prepend domain-name-servers 127.0.0.1 2.2.2.2;
I then rebooted my system, expecting to find these addresses as nameservers in my /etc/resolv.conf, however this was not the case, both addresses do not exist, and my resolv.conf file is untouched.
I also tried changing the prepend parameter to the following
supersede domain-name-servers 127.0.0.1 2.2.2.2;
After reboot, this also did nothing.
I also tried editing /etc/network/interfaces and added the following
dns-nameservers 55.55.55.55
Again, after reboot, no changes.
Is this intentional behavior? Why isn't resolv.conf being updated/overwritten?
resolvconf
installed? (check withdpkg -l | grep resolvconf
). This guy is the responsible to handle nameservers as parameters of/etc/network/interfaces
. More information: wiki.debian.org/NetworkConfiguration#The_resolvconf_program