Redhat 6 / RHEL 6 / CentOS 6 – /etc/resolv.conf overwritten on reboot

The overwrite of /etc/resolv.conf is normal when the network is restarted (and host reboot), so if your DNS Servers change, I updated the file:

Assuming eth0 is the only active NIC (check with “service network status”).

/etc/sysconfig/network-scripts/ifcfg-eth0
PEERDNS=no
DNS1=10.0.0.60
DNS2=10.2.0.32

You will have to restart the network service or reboot the Linux server.

service network restart
service network status

If you want to see which DNS server is binging used, do something like the following which will return a bunch of data including the DNS server that found the domain used in the dig command.

dig yahoo.com

I found most of this information here:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_ip_networking_with_ifcg_files

Leave a Comment

Scroll to Top