Click to See Complete Forum and Search --> : stopping resolv.conf updates
NeilBlue
03-17-2002, 06:25 AM
Hello,
Using : RedHat 7.2
I use an ISDN connection, and my resolv.conf file gets updated each time I reconnect. However I would like to set my resolv.conf to use my local DNS. Please you anyone tell me how to stop this auto update of the resolv.conf file happening please.
Neil Blue
Strike
03-17-2002, 07:09 AM
Two ways I can think of.
1) Since you are running your own DNS server, I surely hope you have your own private network. So, have a DHCP server on your network as well. This will set the namserver entries in that file for you.
2) This is kinda cheap, but totally valid. If you are using ext2 (ick) or ext3 (and maybe other filesystems, I don't know), you can set the file to "immutable" (i.e., can't be deleted/altered) by using chattr +i /etc/resolv.conf. Any attempts to overwrite/alter the file will be unsuccessful (even by root) until you remove that setting with chatter -i /etc/resolv.conf.
NeilBlue
03-17-2002, 08:05 AM
Thanks,
As there is no nice way to disable this then I have written a script in ip-up.local to add the nameserver as needed on connection.
Cheers
Neil
jumpedintothefire
03-18-2002, 01:47 AM
check your all the ppp/options files or the script that starts the connectons for "usepeerdns" and try removing it.
hope it helps...
NeilBlue
03-18-2002, 05:12 PM
Thanks,
I tried commenting the line out before but it didn't work, this time I set peerdns=no in the ifcfg-ippp0 and it worked!
Cheers
Neil