Need to Change Servers Shared IP

My data center is changing to a new provider and has issued new IP addresses and instructed me to make the change ASAP.

I use an outside name server and can easily make the changes there, but will need to change the shared IP for all 145 shared accounts, plus one private IP and the gateway IP. The private IP looks pretty easy, but I want to avoid any mistakes on this production server.

After searching these forums, I found a thread here and got some good info, like use Virtualmin to make the change and not webmin, however I would appreciate some specific pointers on getting this right without using trial and error.

Input is greatly appreciated.<br><br>Post edited by: webwzrd, at: 2008/11/13 10:13

In Virtualmin, under "Addresses and Networking", is an option to Change the IP Address.

It asks you for the new and old IP address, and updates all the Virtual Servers by default.

Perhaps some other folks will offer any tips, tricks, or gotchas, in in theory that option should do what you’re after.

Thanks for the fast reply Eric.

I found what you mentioned… how cool is that!

My provider also mentioned that I will need to change the gateway IP. I see that listed over in webmin under Network Configuration/Routing and Gateways. Is there some other place in virtualmin I should use or is that it?


Routing and gateways is well outside the scope of Virtualmin and virtual hosting. This is definitely a job for Webmin.

Just realize that hitting “Apply Configuration” on the network configuration page will potentially disconnect you from the system, if you’re removing the old IP (or if you aren’t removing the old IP but get the configuration wrong). Even if you get everything right, it might still be no longer reachable on the old IP, since the gateway has changed and the new gateway might not be configured to route for the IP you’re connecting on. Confused yet? But, if you got everything right, you should be able to reconnect on the new IP.

You can bring up temporary interfaces to test the new IP address in the "Interfaces Active Now" section. (Note that anything you do to "Interfaces Active Now" is not permanent. It will not be saved, and will not be reflected after an Apply Configuration. "Interfaces Activated at Bootup" is the permanent network configuration.

Brian, to be clear, that “Change IP Address” option doesn’t actually setup the new IP for you, it just changes the IP associated with the selected Virtual Servers (all by default).

You’d still need to use another area of Virtualmin/Webmin to setup the new IP and gateway (or, for command line junkies, you could also SSH in and change the IP and gateway manually).

So in theory, what you’d first do is change the IP address and Gateway on your server, within the Network Configuration area you were referring to.

Once that IP is online, I’d then go into the “Change IP Address” area, and change the IP for each of those Virtual Servers.


I understand what you are saying about the possibility of losing contact with the box once I change the gateway. A very nerve wrecking possibility.

Where is the "Interfaces Active Now"? That sounds very helpful.


Thanks for clarifying. So looks like I would change the server IP and gateway in the the Network Configuration and reboot. If all goes well and I’m back in, change the virtual IP in virtualmin. And of course make the change at DNS-made-easy.

Sound about right?


I see it now… Boot time configuration / Active configuration

Yeah, what you said sounds right.

It is possible to do all the above without rebooting, but rebooting does resolve a few potential gotchas :slight_smile:

What Joe said is an issue to be careful of – it’s really easy to lock yourself out of the box when remotely changing an IP address. Don’t apply your changes until you’ve added both the IP address and gateway.

What I’d do is work out before you change anything what you’d do if you ended up being locked out of the box. Is there a serial console you can use to access your system when the network isn’t working? Will the folks at your data center log in and fix it? Whatever it is, I’d just recommend having a plan :slight_smile:

Good luck!


You are absolutely right. I have already coordinated the time I’ll do this tonight with my DC and they will be standing by in case I lock myself out.

I’ll update how it went.

It’s the morning after and I survived the IP change. I ran into a couple hiccups, but all and all it went pretty smoothly.

Thanks for all the input.