Hosting Custom Nameservers on Dedicated Server's WHM

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
Hello,
I'm trying to setup on own custom nameservers on my dedicated WHM server.

1) My domain is registered with namecheap. I've set up custom nameservers there
ns1.mydomain.com 54.xx.yy.16
ns2.mydomain.com 54.xx.yy.16


2) On WHM Home / Server Configuration / Basic WebHost Manager® Setup
I've configured address records
ns1.mydomain.com 54.xx.yy.16
ns2.mydomain.com 54.xx.yy.16


3) On WHM I've added A records and other records for mydomain.com on Home / DNS Functions / DNS Zone Manager

Please see the attached screenshots for all of the above.

4) All these have been set up more than 72 hours ago so propagation shouldn't be an issue by now

5) I've a concern that the IP address 54.xx.yy.16 which I've used for both nameservers is the same.
This IP address is also my dedicated server's IP address.
I'm not sure if I should have used my main server's IP address for nameservers? Please advise.

At the end of all these settings
ping ns1.mydomain.com
ping ns2.mydomain.com
are not working

So nameservers are not resolving to my host. How do I fix it?
 

Attachments

Last edited by a moderator:

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
$ dig ns1.mydomain.com @54.xx.yy.16

; <<>> DiG 9.10.6 <<>> ns1.mydomain.com @54.xx.yy.16
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11758
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;ns1.mydomain.com. IN A

;; ANSWER SECTION:
ns1.mydomain.com. 14400 IN A 54.xx.yy.16

;; AUTHORITY SECTION:
mydomain.com. 86400 IN NS ns1.mydomain.com.
mydomain.com. 86400 IN NS ns2.mydomain.com.

;; ADDITIONAL SECTION:
ns2.mydomain.com. 14400 IN A 54.xx.yy.16

;; Query time: 75 msec
;; SERVER: 54.xx.yy.16#53(54.xx.yy.16)
;; WHEN: Tue Apr 04 20:53:27 BST 2023
;; MSG SIZE rcvd: 110
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator
Hey there! It doesn't matter that the IP address is or is not the main shared IP, or if it is being shared with other accounts - the DNS system will still work.

What happens when you check one of the domains using those nameservers with a tool like intodns.com? Or, what happens if you just ping the nameserver from your local workstation? You've said you configured the Basic WebHost Manager setup page, but do the nameservers themselves have A records configured so they respond in DNS?
 

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
1) Ping to nameservers from my local machine

ping: cannot resolve ns1.mydomain.com: Unknown host

2) do the nameservers themselves have A records configured so they respond in DNS?

I've these A records on my host, are these the ones you are talking about?
ns1.mydomain.com.14400A54.xx.yy.16
ns2.mydomain.com.14400A54.xx.yy.16

3) IntoDNS gives bunch of errors:

NS
Info
NS records from your nameserversNS records got from your nameservers listed at the parent NS are:
Oups! I could not get any nameservers from your nameservers (the ones listed at the parent server). Please verify that they are not lame nameservers and are configured properly.


Error
Mismatched NS recordsWARNING: One or more of your nameservers did not return any of your NS records.
Error
DNS servers respondedERROR: One or more of your nameservers did not respond:
The ones that did not respond are:
54.xx.yy.16


Error
Multiple NameserversERROR: Looks like you have less than 2 nameservers. According to RFC2182 section 5 you must have at least 3 nameservers, and no more than 7. Having 2 nameservers is also ok by me.


Error
Missing nameservers reported by your nameserversYou should already know that your NS records at your nameservers are missing, so here it is again:

ns1.mydomain.com.
ns2.mydomain.com.


SOA
Error
SOA recordNo valid SOA record came back!
MX
Error
MX RecordsOh well, I did not detect any MX records so you probably don't have any and if you know you should have then they may be missing at your nameservers!
WWW
Error
WWW A RecordERROR: I could not get any A records for www.anoterdomain.com!

(I only do a cache request, if you recently added a WWW A record, it might not show up here.)

What else I need to setup on my host to fix this?
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator
The first thing I would confirm is that port 53 is open for inbound connections to your machine. The easiest way to test that would be with a simple telnet test to your server, from an external system:

Code:
telnet x.x.x.x 53
where "x.x.x.x" is your server's IP address. If that isn't open, no nameserver functions will work properly. Let's confirm that is open and not filtered and then we can go from there.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator
Alright, so that's good.

The next thing is to find out why the nameservers don't respond to ping. This part seems more odd since your "dig @" test seemed to work well, but a general ping did not.

Are the A records part of individual ns.domain.com zone files? If so, you will likely see improvement by placing those A records in the main domain.com zone instead of relying on the separate ns.domain.com zone files.