New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
help me with dns please ns1 and ns2
Oldmanasking
Member
in General
Ok the story is I have 20 accounts that has my customers in it . I am a freelanceer website deign . They are all in one VPS but I need to migrate to another VPS
All of them have my VPS name servers ns1. mydomain.com ns2.mydomain.com
The problem is that every time I migrate to new vps once in a few years I have to ask them change name servers to another ns1 and ns2
What is the solution that I have always fixed ns1 and ns2 no matter if even I change VPS ?
Comments
I assume the nameservers are hosted on the VPS? You could separate them from the rest of your infrastructure by moving them to a cloud provider such as Vultr, UpCloud, etc.
Thanks but then what happens if client wants to change his dns?
You need a DNS provider or 2 different vps servers which serve the DNS requests.
So you can have in theory what you call fixed ns1 and ns2, however, if the IP changes, you still need to change that on the DNS servers. So they are not really fixed.
Whatever you do, their is not such as "fixed".
DNS always points the machine that does the job, when you move it, you have to change it everytime. You could try to automate this with a cronjob that calls an API and updates the DNS servers with the current IP when you update it that frequent.
Pointing ns1 and ns2 to the machine is not recommended, I do that but don't do that.
Use at least 2 different machines, on different networks, independent from each other.
................................
Thanks Neoon so this is what you mean, I copy the same DNS information and put it into two VPS . one of them will ben ns1.mydomain.com and another ns2.mydomain.com then I always make sure that the are same . OK it is fine however what if the client wants to change his dns or add some thing in cpanel ? Then He needs to inform me and I put that information in both VPS manually again?
Wait... So you are using cPanel on those VPS? And DNS are provided through cPanel DNS right?
Yeah, everything changes if you are using cPanel ...
No idea about CPanel, makes everything complex.
I use tiny software like NSD, for DNS.
https://nlnetlabs.nl/projects/nsd/about/
Assuming that you are running cPanel ... and assuming when you "migrate to another VPS" it will ALSO have cPanel and will continue with the same hostname ... you should be doing things this way....
Have a DNS cluster with ns1 and ns2 ... ns1 is your cPanel server. ns2 will be a second VPS running cPanel DNS only on it.
Then when you migrate, the only thing you should have to do is change the IP of the cPanel server (ns1) with your domain registrar (glue record).
This assumes that there is a way to migrate cPanel that copies and moves everything of course ....
If he is indeed using cPanel (on both server), migration won't be that hard. But he still should (if he could) move his DNS onto two small clusters that runs DNS ONLY server and just link to his cPanel main server, which would prevent a** pains whenever he migrates again.
Yes, this is even a better idea .. 2 vps with DNS only and the main cPanel server as a master.
Grab 3 vps in total.
1. The big one use as a master webserver where you will host all accounts
2. On the remaining 2 small vps install cPanel DNS only and use them as your physical nameservers.
3. Now integrate them with the master using DNS cluster.
Now every time you move your main server just needs to reintegrate those dns servers with the new master
Thanks a lot at last some body explained it in a way that I understand but what if I am not using cpanel ? Also what about any alternative to cpanel dns only?
This process will work on DirectAdmin too.
Can you please tell me which panel you are using to host your clients?
I am using cpanel but I might some day more them to directadmin so you mean if clients are in cpanel the others also need cpanel and if directadmin all others directadmin?
We never tested multiple panel combination for a single project and don't think it's possible.
If your Master webserver is on cPanel then use cpanel dns only license for nameservers
If you are using Directadmin to host accounts the use directadmin for nameservers.
Edited: If you move master webserver from cPanel to Directadmin then you have to setup dns servers with Directadmin as well. Don't worry it's not difficult
I manage 100s of accounts and dozens of servers, every customer points to Route53, then A records to the server. If we have to move a customer we dont even need to contact them, just edit the A record.
If I were you I would chose premium DNS services such as Route53, or step it up and use Cloudflare.
The fuck, thats a step down, far down.
Selfhosted is always a better option than CF.
I agree
I'm confused if your not giving your customers direct access to their hosting solution why not just load everything to a highly reliable free DNS provider like Vultr and use their name server then all you do is update the dns settings when you change VPS servers.