Change name and IP of DNS Only server
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
-
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. 0 -
Thanks for the tips. My second go round was successful. 0 -
@sozotech As we're going to be doing this in a week or two, what else did you have to do? 0 -
@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, Eric0 -
Hello, I am happy to see this has been addressed. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
5 comments