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.

[ipcheck] Problem with DNS setup on host-name.hostnamesomekindofaddress.com

Discussion in 'Security' started by Smaily, Sep 19, 2011.

  1. Smaily

    Smaily Well-Known Member

    Joined:
    Sep 19, 2011
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Code:
    IMPORTANT: Do not ignore this email.
    
    The hostname (host-name.hostnamesomekindofaddress.com) resolves to 80.10.100.2. It should resolve to 80.10.101.150. Please be sure that the contents of /etc/hosts are configured correctly, and also that there is a correct 'A' entry for the domain in the zone file.
    
    Some or all of these problems can be caused by /etc/resolv.conf being setup incorrectly. Please check that file if you believe everything else is correct.
    
    You may be able to automatically correct this problem by using the 'Add an A entry for your hostname' option under 'Dns Functions' in your Web Host Manager.
    I have two different IP address bulks. 80.10.100.1-80.10.100.62 and 80.10.101.130-80.10.101.190 I have set them both working on WHM and put one nameserver on 80.10.100.2 and other nameserver on 80.10.101.150. Set default gateway on 80.10.101.150. Yet this has been working for a month but im getting this kind of emails. Is this something I should be worried about?

    contents of /etc/hosts
    Code:
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1               localhost
    80.10.100.2             host-name
    80.10.101.150           host-name.hostnamesomekindofaddress.com host-name
    
    contents of /etc/resolv.conf
    Code:
    search hostnamesomekindofaddress.com
    nameserver 80.10.100.2
    nameserver 80.10.101.150
    
     
    #1 Smaily, Sep 19, 2011
    Last edited: Sep 19, 2011
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Re: [ipcheck] Problem with DNS setup on host-name.hostnamesomekindofaddress

    First of all, your /etc/resolv.conf file should not contain your IP addresses. The point of a resolver would be to use an off server service to grab DNS results. You would want to use a good public resolver such as google's or level 3's:

    Code:
    nameserver 8.8.4.4
    nameserver 8.8.8.8
    nameserver 4.2.2.1
    nameserver 4.2.2.2
    nameserver 4.2.2.3
    nameserver 4.2.2.4
    Next, you have two IPs listed in /etc/hosts for your hostname when only one of those IPs should be the hostname. Which IP is the one that should be the main one for your machine and be the hostname, is it 80.10.100.2 or 80.10.101.150 ?
     
  3. Smaily

    Smaily Well-Known Member

    Joined:
    Sep 19, 2011
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Re: [ipcheck] Problem with DNS setup on host-name.hostnamesomekindofaddress

    Okay as I get I shall delete everything off etc/resolv.conf and add this instead
    Code:
    nameserver 8.8.4.4
    nameserver 8.8.8.8
    nameserver 4.2.2.1
    nameserver 4.2.2.2
    nameserver 4.2.2.3
    nameserver 4.2.2.4
    a good public resolver such as google's ?
    search google.com you mean?

    ns1 is 80.10.100.2 and it's also shared ip address.
    ns2 is 80.10.101.150 and it's also default gateway and resolves to hostname with an A entry.
     
  4. ChrisRHS

    ChrisRHS Well-Known Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    Re: [ipcheck] Problem with DNS setup on host-name.hostnamesomekindofaddress

    Hello there,

    These are Googles public name servers:
    Code:
    nameserver 8.8.4.4
    nameserver 8.8.8.8
    
    Chris
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Re: [ipcheck] Problem with DNS setup on host-name.hostnamesomekindofaddress

    Your reply has confused me on which is supposed to be the server's hostname. Which IP should be the server's hostname IP? You can only have one hostname IP. Please only mention one IP for the hostname, because that's the one that needs to be in /etc/hosts file and not the other IP.
     
  6. Smaily

    Smaily Well-Known Member

    Joined:
    Sep 19, 2011
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Re: [ipcheck] Problem with DNS setup on host-name.hostnamesomekindofaddress

    80.10.101.150 seems to be server main IP and hostname.

    then what shall I enter into etc/resolv.conf and what into etc/hosts file when I have two nameservers? and when I add in the future for example two more?

    /etc/resolv.conf
    Code:
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1               localhost
    nameserver 8.8.4.4 host-name
    nameserver 8.8.8.8 host-name.hostnamesomekindofaddress.com host-name
    /etc/hosts
    Code:
    search hostnamesomekindofaddress.com
    80.10.101.150
    correct?
     
    #6 Smaily, Sep 20, 2011
    Last edited: Sep 20, 2011
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Re: [ipcheck] Problem with DNS setup on host-name.hostnamesomekindofaddress

    I provided previously what to put into the /etc/resolv.conf file exactly. You would not want to put entries after the IP for the nameserver resolver and what you have is not correct at all:

    Code:
    nameserver 8.8.4.4
    nameserver 8.8.8.8
    nameserver 4.2.2.1
    nameserver 4.2.2.2
    nameserver 4.2.2.3
    nameserver 4.2.2.4
    You should never put localhost into /etc/resolv.conf file unless you wish to break your DNS resolution functioning.

    For /etc/hosts, you should have:

    Code:
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1               localhost
    80.10.101.150           host-name.hostnamesomekindofaddress.com host-name
    Ensure to use WHM > Change Hostname after setting this up in the files to set that as the right hostname and IP.
     
  8. Smaily

    Smaily Well-Known Member

    Joined:
    Sep 19, 2011
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Re: [ipcheck] Problem with DNS setup on host-name.hostnamesomekindofaddress

    Thanks Tristan.
     
Loading...

Share This Page