Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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 to after every 2 minutes it changes to again... I am confused what is going on.. i have changed resolv.conf several times,,but again and again it changes automatically....

    Plz help..


  2. #2
    Try disabling the NetworkManager service and just use the classic network initscript.

    chkconfig NetworkManager off
    service NetworkManager stop
    chkconfig network on
    service network restart
    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.

  3. #3

    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/

    This will be used to generate: nameserver
    in /etc/resolv.conf


  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts