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

Smaily

Well-Known Member
Sep 19, 2011
46
0
56
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
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
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 ?
 

Smaily

Well-Known Member
Sep 19, 2011
46
0
56
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?

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

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
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.
 

Smaily

Well-Known Member
Sep 19, 2011
46
0
56
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?
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
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.