resolv.conf reset by DA on reboot?

paul-w

Verified User
Joined
Jan 25, 2006
Messages
51
Location
Berkshire, UK
Hi

Are the nameservers in /etc/resolv.conf changed by DA on reboot to those in NS1 and NS2 under Admin Level / Administrator Settings?

Server Version 1.45.0
CentOS 6.5
 
/etc/resolv.conf
this file only for you netowrk, your dns for you network,
if it reset anytime you boot, that mean you have DHCP, not static ip.
 
DirectAdmin shouldn't touch this. To avoid possible cache poisoning and site redirection you shouldn't even allow caching (recursive lookup) on your authoritative nameserver(s).

Some operating systems do change it on reboot.

What OS are you running?

Make sure that the file at /etc/resolv.conf isn't a link.

And if you can't find where your OS is changing it, then chattr it as immutable:
Code:
chattr +i /etc/resolv.conf
I had to do that recently on a Kubuntu Linux (kubuntu.org) desktop install. (I've recently switched to Kaos Linux [kaosx.us] as it's a more pure KDE distribution. And it's a rolling distribution so I shouldn't ever need to install a newer version from scratch.)

Jeff
 
DirectAdmin shouldn't touch this. To avoid possible cache poisoning and site redirection you shouldn't even allow caching (recursive lookup) on your authoritative nameserver(s).

Some operating systems do change it on reboot.

What OS are you running?

Make sure that the file at /etc/resolv.conf isn't a link.

Yeah, I didn't think DA changed it. It's CentOS 6.5 I'm running, resolv.conf isn't a symlink.

It's a virtual machine. Wonder if there's a NIC that uses DHCP? This shows nothing:
# grep BOOTPROTO /etc/sysconfig/network-scripts/ifcfg*
/etc/sysconfig/network-scripts/ifcfg-eth0:BOOTPROTO=static

In the end I did:
# chattr +i /etc/resolv.conf

Thanks very much, Jeff.
 
Back
Top