SOLVED Change name and IP of DNS Only server

sozotech

Well-Known Member
Jul 26, 2013
106
5
68
cPanel Access Level
Root Administrator
I am working on updating a CentOS 6 DNS only server (BIND) to CentOS 7 DNS only server (PowerDNS). I got all of the zones synced to the new server and I wanted to rename it to the name of the old server and use that IP. I tried doing this yesterday but ran into issues with PowerDNS not starting and I could not get logged into WHM on the server so I failed back.

The PowerDNS issue was a bunch of dead zones with syntax errors in the zone files that apparently BIND just ignores so I cleaned that up.

In regard to changing the IP and hostname I just edited the IP in /etc/sysconfig/network-scripts/ifcfg-eth0 and did a /usr/local/cpanel/bin/set_hostname before rebooting. Is there anything else beyond that I should be doing before rebooting? I've done this numerous times, so I am guessing I missed something and that is why the cPanel service/WHM wouldn't load. Any advice would be appreciated!

Best regards,
Eric
 

andrew.n

Well-Known Member
Jun 9, 2020
519
138
43
EU
cPanel Access Level
Root Administrator
I remember there was a script to replace the old IP with the new one everywhere at least on a cPanel server but I don't recall it now. I would check the following files:

/etc/ips
/var/cpanel/mainip
/etc/hosts


Also make sure you do restart network with ipaliases. Furthermore BIND uses different format than PowerDNS just to note.
 

sozotech

Well-Known Member
Jul 26, 2013
106
5
68
cPanel Access Level
Root Administrator
@sozotech As we're going to be doing this in a week or two, what else did you have to do?
Really not much else. My initial process would have worked, but had to clean up all those bad zone files so PowerDNS would load and then also re-install the cPanel service SSL certificates to get into the WHM. I am using FleetSSL DNSONLY - Free SSL for cPanel® DNSONLY using Let's Encrypt™

I did also make sure the files @andrew.n mentioned were updated as well.

Best regards,
Eric
 
  • Like
Reactions: andrew.n