issue with /etc/resolv.conf after reboot

Community support for Plesk, CPanel, WebMin and others with insight from two of the founders of Plesk. Ask for help here! No question is too simple or complicated. :-)
DarkF@der
Forum Regular
Forum Regular
Posts: 313
Joined: Thu May 07, 2009 12:46 pm

issue with /etc/resolv.conf after reboot

Unread post 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
User avatar
webfeatus
Forum Regular
Forum Regular
Posts: 196
Joined: Wed Jan 13, 2010 9:11 am
Location: Bali

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

Unread post 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)
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
mneese77
Forum Regular
Forum Regular
Posts: 137
Joined: Wed May 12, 2010 5:40 pm

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

Unread post 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
BruceLee
Forum Regular
Forum Regular
Posts: 879
Joined: Sat Mar 28, 2009 6:58 pm
Location: Germany

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

Unread post 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/
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

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

Unread post by faris »

resolv.conf may also get overwritten if it is a VPS - and definitely will if it is a Virtuozzo VPS.

Faris.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
User avatar
webfeatus
Forum Regular
Forum Regular
Posts: 196
Joined: Wed Jan 13, 2010 9:11 am
Location: Bali

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

Unread post 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)
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
Post Reply