Nat problem with website dns nameservers

iLinux85

Well-Known Member
Mar 28, 2010
52
2
58
my website ns1 and ns2 nameservers resolve to private ip instead of public ip

i run intodns check and this is the problem

Code:
Looks like the A records (the GLUE) got from the parent zone check are different than the ones got from your nameservers. You have to make sure your parent server has the same NS records for your zone as you do.I detected some problems as follows:
For ns2.example.com the parent reported: ['62.1X.X.X'] and your nameservers reported: ['172.31.xx.xx']
For ns1.example.com the parent reported: ['62.1X.X.X'] and your nameservers reported: ['172.31.xx.xx']

Here is the full details

# cat /var/cpanel/cpnat
172.31.xx.xx 62.1X.X.X'

# cat /etc/hosts
Code:
127.0.0.1               localhost localhost.localdomain localhost4 localhost4.localdomain4
::1             localhost localhost.localdomain localhost6 localhost6.localdomain6
172.31.xx.xx            server.example.com server

when i set in website dns zone file private ip instead for nameservers

ns2 14400 IN A 172.31.xx.xx
ns1 14400 IN A 172.31.xx.xx


the warrning message in intodns gone but the website still not working unreachable but i know this is wrong the put private ip address nameserver inside the dns zone file should be point to public ip address

i manually modified the ip address to real ip in /var/cpanel/nameserverips.yaml and removed the cache file. but when i run /usr/local/cpanel/scripts/updatenameserverips the ips return back to private ip address which is 172.31.xx.xx

i dunno where exactly the problem is?
 
Last edited:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
When you go to WHM>>Server Configuration>>Basic WebHost Manager Setup and configure your nameserver's address records you will want to enter in the Public IP address here, the same for when you create the nameservers at the registrar.

/scripts/updatenameserverips does a DNS lookup of what is shown at the registrar and has no bearing on whether or not your nameservers work - it runs once daily automatically and will overwrite what is present in /var/cpanel/nameserverips.yaml with what is found in the DNS lookup. Once the nameservers have been propagated with the public IP address (24-48hrs) this should update automatically.