Page 1 of 1

issue with /etc/resolv.conf after reboot

Posted: Fri Apr 30, 2010 5:50 am
by DarkF@der
Hello,

i have a issue with the /etc/resolv.conf

everything works fine but when i reboot the machine the /etc/resolv.conf wil be changed and i have to update it again to let i works like i want to have it work. :(

I'm running Centos 5.4 Final

On the inet i read most of the systems have /etc/sysconfig/network/config to change

MODIFY_RESOLV_CONF_DYNAMICALLY

but i can find it :?

Does somebody knows how to change /etc/resolv.conf permantly so when i reboot it won't change anymore?

Thanx in advanced

Re: issue with /etc/resolv.conf after reboot

Posted: Mon Aug 02, 2010 8:13 am
by webfeatus
same problem.
resolv.conf is rewritten after reboot.

Problem seems to have started around the time of these updates:
Jul 16 18:52:12 Updated: db4-utils-4.3.29-10.el5_5.2.i386
Jul 16 18:52:11 Updated: device-mapper-multipath-0.4.7-34.el5_5.4.i386
Jul 16 18:52:10 Updated: gnupg-1.4.5-14.el5_5.1.i386
Jul 16 18:52:08 Updated: libtiff-3.8.2-7.el5_5.5.i386
Jul 16 18:52:07 Updated: lvm2-2.02.56-8.el5_5.5.i386
Jul 16 18:52:05 Updated: 2:libpng-1.2.10-7.1.el5_5.3.i386
Jul 16 18:52:05 Updated: kpartx-0.4.7-34.el5_5.4.i386
Jul 16 18:52:05 Updated: nss-3.12.6-2.el5.centos.i386
Jul 16 18:52:04 Updated: db4-4.3.29-10.el5_5.2.i386
(maybe)

Re: issue with /etc/resolv.conf after reboot

Posted: Mon Aug 02, 2010 12:35 pm
by mneese77
I am only commenting on the statement:
Problem seems to have started around the time of these updates:
which is not true...this has been the way it is for as long as I have had a server with centos...(only seven months, but, hey!)
If anyone comes up with a solution, please post this...thanks

Re: issue with /etc/resolv.conf after reboot

Posted: Mon Aug 02, 2010 12:51 pm
by BruceLee
I think thats quite normal when you have a DHCP based network environment and your hoster changed something.
One of these options should do the trick:

http://www.cyberciti.biz/faq/dhclient-e ... onf-hooks/

Re: issue with /etc/resolv.conf after reboot

Posted: Mon Aug 02, 2010 3:40 pm
by faris
resolv.conf may also get overwritten if it is a VPS - and definitely will if it is a Virtuozzo VPS.

Faris.

Re: issue with /etc/resolv.conf after reboot

Posted: Wed Aug 04, 2010 4:37 am
by webfeatus
Yes, in my case, the issue was the virtual server.

Checked the /etc/vz/conf/1001.conf file on the host O/S

Edit the /etc/vz/conf/1001.conf file to reflect the permanent use of the nameservers you require on the VPS

NAMESERVER="4.2.2.4 111.222.333.444 111.222.333.444"
- will set the order.

(I am still waiting to test the reboot issue)