[ISPConfig] IP Address Changes

I was using ISPConfig, to ease my life configuring and managing WebServer at work and I am thinking to change IP Address of webserver to another segment. I got confused how to change the IP address of ISPConfig 2 so that all sites and system recognized and used the new IP properly. Luckily I am still subscribed to ISPConfig Forum and I found this thread which help me a lot. Below is copy of how to from that forum just incase the forum is down.

I recently changed the IP addresses of a server running ISPConfig 2 and stumbled upon this thread. Since the server was hosting many sites, I was looking for a more effecient way to update the IP for all the sites in ISPConfig. Thought I would share my solution in case anyone else has this issue.

Please note: this worked for me on ISPConfig 2 running on Ubuntu 8.10. Location of config files my be different depending on your system.

After you change the IP on the system, log into ISPConfig and replace the IP address under Management > Server > Settings. Then replace the IP address in config files:

xxx.xxx.x.xx represents new IP
yyy.yyy.y.yy represents old IP

Bind9

perl -pi -e 's/yyy\.yyy\.y\.yy/xxx.xxx.x.xx/g' /var/lib/named/etc/bind/*

Apache

perl -pi -e 's/yyy\.yyy\.y\.yy/xxx.xxx.x.xx/g' /etc/apache2/vhosts/*

Now, log into MySQL, use the ispconfig database, and run the following queries to update the IP in ISPConfig:

DNS Manager

UPDATE dns_a SET ip_adresse = 'xxx.xxx.x.xx';
UPDATE dns_isp_dns SET dns_soa_ip = 'xxx.xxx.x.xx';

ISP Manager

UPDATE isp_isp_web SET web_ip = 'xxx.xxx.x.xx';
UPDATE isp_isp_domain SET domain_ip = 'xxx.xxx.x.xx';

Of course, you will need to restart apache and bind. Now all sites should load and when you log into ISPConfig you will see the new IP for each site and all your DNS records. Go to one of your sites under ISP Manager, make a minor change and hit save so that ISPConfig rewrites the config files. Then verify that ISPConfig is using the new IP and you’re good to go.

SocialTwist Tell-a-Friend

Related posts:

  1. [cPanel] Add another main shared IP Address cPanel has 1 main shared IP address which configured on...

Leave a Reply