The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

resolv.conf IP keeps re-appearing!

Discussion in 'General Discussion' started by 4u123, Feb 8, 2010.

  1. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    Hi, can you think of any reason why an IP address would keep re-appearing in /etc/resolv.conf after I removed it?

    That IP isnt configured in the WHM resolvers. I have no idea where its coming from but it seems if I reboot the server, it comes back.

    Using centos5
     
  2. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    I just worked out - that IP is the address of the main domain used in the hostname of the server.

    So if the server is server001.mydomain.com - the IP address of "mydomain.com" is automatically added to resolv.conf as a nameserver.

    Any idea How I stop this from happening?
     
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    By stock-default behavior, cPanel/WHM does not automatically change the resolver configuration upon boot.

    Via root SSH access to the affected system, please provide the output from the following command:
    Code:
    # cat /var/cpanel/envtype && echo
     
  4. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    Thanks Don, its Ok I worked it out.

    I recently set up a storage network and I've currently got eth1 on each server set to dhcp. Its the dhcp client in centos that seems to be updating resolv.conf.

    Edit... For anyone else who has this problem, edit /etc/sysconfig/network and add the line...

     
    #4 4u123, Feb 8, 2010
    Last edited: Feb 8, 2010
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Thank you for the update and additional details regarding the resolution. :)
     
Loading...

Share This Page