Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    640

    Default resolv.conf IP keeps re-appearing!

    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. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    640

    Default

    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. #3
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    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. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    640

    Default

    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...

    PEERDNS=no
    Last edited by 4u123; 02-08-2010 at 06:27 PM.

  5. #5
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by 4u123 View Post
    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...
    Code:
    PEERDNS=no
    Thank you for the update and additional details regarding the resolution.

Similar Threads & Tags
Similar threads

  1. /etc/resolv.conf
    By coffee23 in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 10-26-2007, 08:28 PM
  2. resolv.conf
    By jollymon in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-01-2006, 05:50 PM
  3. what should /etc/resolv.conf look like?
    By spaceman in forum cPanel and WHM Discussions
    Replies: 15
    Last Post: 04-28-2006, 04:14 PM
  4. /etc/resolv.conf what should be there
    By dunno in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-18-2003, 04:01 PM
  5. resolv.conf again
    By n2nis in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-22-2002, 06:30 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube