Two nameservers with only one IP, my vps-provider's IP or two IPs from two different nodes

phicts

Active Member
Feb 8, 2013
36
0
6
cPanel Access Level
Root Administrator
My goal is to have at least two nameservers using my own domain; for example:
ns1.mydomain.tld
ns2.mydomain.tld

However, the vps-provider only gives one (1) IP for each vps/node - as a matter of policy. They do assign you one IP for each vps/node you create in your account with them. In my case, I have two IP - one each from the two different nodes.

They also provide their own DNS management where you can use their three nameservers.

Still, I would like to use my own domain name for the nameserver. How can I achieve what I want?

Can I use the IP of my provider's nameservers under my own nameserver? Like,
ns1.myprovider.tld = 123.456.78.9 -> ns1.mydomain.tld
ns2.myprovider.tld = 123.456.79.1 -> ns2.mydomain.tld

Or can I use the assigned IPs of my two different vps for my nameserver?
assigned IP of vps 1 = 123.456.67.9 - > ns1.mydomain.tld
assigned IP of vps 2 = 123.456.78.9 - > ns2.mydomain.tld

Or mixed? Like,
assigned IP of vps 1 = 123.45.67.9 - > ns1.mydomain.tld
ns1.myprovider.tld = 123.456.78.9 - > ns2.mydomain.tld

Is there any alternative? I don't want to use my single IP for both the nameserver as i know it's just useless in the long run.

Please advise. Thanks a lot.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

The DNS will not be controlled by your VPS server if you use your provider's name server IP addresses. Using an IP address from another VPS is not recommended unless you configure DNS clustering. That being said, DNS clustering is not recommended for two hosting servers. It's better used with additional servers that are configured for DNS purposes only.

I suggest using the same IP address for both name servers, or contacting your VPS hosting provider to purchase an additional IP address for your second name server.

Thank you.
 

phicts

Active Member
Feb 8, 2013
36
0
6
cPanel Access Level
Root Administrator
Thanks for the reply.

I have already registered one nameserver in my domain provider using the assigned IP to me. But i'm also still using my vps provider's nameservers. Do I have to delete them there or can I just leave it as is?

Moreover, my vps provider has its own DNS settings and I'm still using their nameservers for my vps. I have already added my own newly created nameserver. If I delete their nameserver record in my domain provider's dns settings, do I have to delete their (my vps provider's) nameserver in their dashboard?
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
I see no reason why you would have to delete the additional name servers at the registrar other than for organizational purposes. Their existence would have no effect on your name servers unless they were actually used. It may be a good idea to delete them so it makes it easier for you to see what name servers you have configured.

Thank you.
 

phicts

Active Member
Feb 8, 2013
36
0
6
cPanel Access Level
Root Administrator
I used the IP assigned to me for ns1.mydomain.tld then also used the IPs added in WHM the two IPs of the nameservers of my vps provider and used them for ns2.mydomain.tld & ns3.mydomain.tld which appears to be working fine.
Thanks for the replies.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
I used the IP assigned to me for ns1.mydomain.tld then also used the IPs added in WHM the two IPs of the nameservers of my vps provider and used them for ns2.mydomain.tld & ns3.mydomain.tld which appears to be working fine.
With that setup, when you change any DNS zone in your VPS the zone is changed ONLY in ns1.mydomain.tld, NOT in ns2.mydomain.tld & ns3.mydomain.tld.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
With that setup, when you change any DNS zone in your VPS the zone is changed ONLY in ns1.mydomain.tld, NOT in ns2.mydomain.tld & ns3.mydomain.tld.
This is correct. While it may appear to be working well at the moment, you could experience problems when a DNS request is served from NS2 or NS3.

Thank you.
 

phicts

Active Member
Feb 8, 2013
36
0
6
cPanel Access Level
Root Administrator
This is correct. While it may appear to be working well at the moment, you could experience problems when a DNS request is served from NS2 or NS3.

Thank you.
Thanks to you both quietFinn & cPanelMichael. So how should I do it the correct way with just one IP assigned to me?

How can I have my run my own two nameservers with just a single IP? WHM doesnot allow me to do that on the panel. Says IP is already used or assigned - something like that.

Could you please post a step by step solution? I'm quiet new to this nameserver thing. Thanks again.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
It's important to remember that name servers are created and assigned at the domain registrar. The only necessary step you need to take on the cPanel server is to add the "A" records for your name servers via:

"WHM Home » DNS Functions » Edit DNS Zone"

Simply ensure the "A" records exist in the parent domain's DNS Zone for your name server entries. There are other ways to configure this, but this is one of the easier methods to do so.

Thank you.
 

phicts

Active Member
Feb 8, 2013
36
0
6
cPanel Access Level
Root Administrator
I've set the name serves in my domain registrar as well as in the WHM Edit DNS Zone for the only IP assigned to me. And my three sites hosted on the vps are resolving fine. Thanks a lot.