I'm running some tests on a Debian server. The network in which this server is located has two DNS servers (I don't know why and I can't change this). I used to need to point /etc/resolv.conf
to one of these servers and I recently had to change which server I use. Since I changed /etc/resolv.conf
to point to the new server, the configuration keeps changing behind my back every few days (it changes back to the old server).
For all I know, the machine has not rebooted. What should I check to figure out why this happens, and how can I stop it?
Best Answer
You are probably using DHCP for automatic IP configuration.
Best option to try:
or
file contains configuration information for dhclient. You can toggle the DNS updates/ point to different DNS server from this file. The man pages for DHCLIENT.CONF and DHCP-OPTIONS point out that in dhclient.conf, you should add this:
where
are DNS server IPs
Following link have more scenarios/possible solutions covered.