Howto: moving ns2 to new server

dreamwiz

Well-Known Member
Aug 28, 2003
93
0
156
I wrote this howto for RH Enterprise + Cpanel. This is how I changed
my ns2 from old server to new server. WHile studying this myself I found
there wasnt many guides about how to do this, especially if you feel
unsecure using only WHM for this. I try to put the steps below to be
exact same what I did. I take no responsibility on this, it worked for me but no guarentees.

1. Get extra IP from your ISP
2. Add IP address from WHM under IP Functions -> Add a new IP address
3. In WHM, go Service Setup -> nameserver setup and enable nameserver
4. In new and old server WHM remove the old ns2 from Server setup -> manage nameserver ip's section
5. In old and new server (I did like this, I believe this would go with sync too) login as root via ssh.
type: pico -w /var/named/maindomain.com.db

Find the section for ns2.maindomain.com, after that is an ip address. Replace it with the new ip address.

The following is borrowed from DiSoft's post (http://forums.ev1servers.net/showth...&perpage=25&highlight=nameserver&pagenumber=1).
----
/etc/wwwacct.conf
Check that the nameservers are correctly specified on NS, NS2 etc.

/etc/resolv.conf
Check that there are nameserver entries for each IP. There may also be one for 127.0.0.1 - this is okay. I'm led to believe (by the 'man' entry for resolv.conf) that this isn't a particularly important file, but I changed mine to read:

domain mybox.com
search mybox.com
nameserver 127.0.0.1
nameserver 111.111.111.111
nameserver 222.222.222.222

Where 'mybox.com' is the main domain of my server, and '111.111.111.111' and '222.222.222.222' are the IP addresses of my primary and secondary nameservers.

resolv.conf is used to lookup names that are not in FQDN format.

/etc/nameserverips
Check that there are entries for each IP acting as a nameserver.
----

6. In both servers WHM, Cluster/Remote Access -> Configure Cluster. Enable clustering.

7. Restart bind on both servers

8. Go to your registrar and change your parental nameservers IP to the new one.

9. Update the nameserver ip in your main domain.

10. Check in both servers WHM in Server Setup -> Manage nameserver IP's that there is the new IP addresses.

11. DONE! Now you just need to wait for some while for the dns to propagate. check www.dnsreport.com once in a while to ensure everything is working properly.


This is not a complete guide and I was writing it quickly, so it's highly possible I have
forgotten something. If there is something missing, please correct me.

Some posts and links I found useful:

DiSoft's post about cpanel nameservers

Solokron's howto to cpanel nameservers

CPanel's quick dns-clustering guide
 

sawbuck

Well-Known Member
Jan 18, 2004
1,365
10
168
cPanel Access Level
Root Administrator
Only thing you may want to change is the localhost entry in the resolv.conf. In the last few months it was determined that using 127.0.0.1 could be a security issue (primarily with reseller accounts) and instead the entry should be the primary/virtual IP of the server.