Results 1 to 3 of 3
Hello All
i have configured Squid proxy and dhcp server on my RHEL 6 machine...i have set static ip address on both lan cards, but the only problem i am ...
- 08-31-2011 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 34
resolv.conf changes automatically
Hello All
i have configured Squid proxy and dhcp server on my RHEL 6 machine...i have set static ip address on both lan cards, but the only problem i am facing that my resolv.conf changes automatically.. i have changes nameserver from 92.242.132.8 to 192.168.1.1...but after every 2 minutes it changes to 92.242.130.8 again... I am confused what is going on.. i have changed resolv.conf several times,,but again and again it changes automatically....
Plz help..
Regards
Vinod
- 08-31-2011 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
Try disabling the NetworkManager service and just use the classic network initscript.
If you don't like that, you can try setting the NM_CONTROLLED=no and PEERDNS=no in your /etc/sysconfig/network-scripts/ifcfg-eth files, though I've had less reliable results doing it that way.Code:chkconfig NetworkManager off service NetworkManager stop chkconfig network on service network restart
- 09-02-2011 #3Just Joined!
- Join Date
- Jul 2011
- Location
- San Diego, CA
- Posts
- 7
DNS1 value in ifcfg-ethX
If you see a line at the top of /etc/resolv.conf that looks like:
# Generated by NetworkManager
or says something about the file being generated by a dhclient script, then you don't want to change resolv.conf directly. As you've already seen, your changes get blown away.
If you decide that you want to continue using NetworkManager, you should be able to add this line to your ifcfg-ethX file in /etc/sysconfig/network-scripts/
DNS1=192.168.1.1
This will be used to generate: nameserver 192.168.1.1
in /etc/resolv.conf
Mike


Reply With Quote