tiff2342

Well-Known Member
Apr 20, 2012
140
0
66
cPanel Access Level
Root Administrator
ive just setup a new ns2 server how do i change all the old ips on ns1 records to the new ns2 records?

and how do i change the ns2 ip on the main server?
 

cPanelMichael

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

Are you attempting to change the IP address assigned to the name server? If so, that must be completed at the domain registrar. Otherwise, you can utilize the following option to change the IP address for all accounts:

"WHM >> IP Functions >> IP Migration Wizard"

Thank you.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
If the nameserver has a new IP, you'll have to use WHM > Basic cPanel & WHM Setup to revise the nameserver name and/or IP there.

If the already existing zones need to also be revised, you could use these steps:

1. Make a copy of /var/named to /var/named-backup

Code:
cp -a /var/named /var/named-backup
2. Replace the nameserver name using a perl command

Code:
perl -pi.bak -e "s/oldnameserver/newnameserver/g" *.db
Please note that you'd replace oldnameserver with the old nameserver name and newnameserver with the new nameserver name.

3. Update the serial numbers for all the zones and reload named

Code:
cd /sbin
wget http://download.ndchost.com/cpanel-whm/scripts/updateserial/updateserial
chmod 750 updateserial
/sbin/updateserial -d /var/named
Similar steps are detailed in this discussion in our forum other than the serial number increment one:

http://forums.cpanel.net/f5/bulk-update-dns-zones-267331.html

I tried the serial increment script noted there myself and it doesn't appear to work, so I opted for the above script instead.

Thanks!