Change Server IP Address

My server has 5 IP addresses - one main one (eth0) and 4 other (eth0:1 etc).

I want to swap the main IP address of the server (eth0) to one of the other. Is it as simple as going to networking configuration/networking interfaces/eth0 and editing it (and that of the virtual IP address)?

Anyone with thoughts or pointers?

Howdy,

Unfortunately, I’m not really sure.

On one hand, I think about it and think it might work just fine.

On the other hand – eth0 is setup as the default shared IP address, and Virtualmin’s Network Settings (in System Settings -> Virtualmin Config -> Network Settings) looks for a particular network interface… and Virtual Servers using private IP’s are associated with a particular network interface too I believe.

I haven’t tried that before – if this is a live server, what you may want to do is test it on a test system, possibly a VirtualBox system, to see if that would work without causing any interruption.

-Eric

It worked!

I had to change eth0:1 to a different ip address,
change eth0 to the one eth0:1 vacated,
then eth0:1 to the one eth0 was

This swapped the IP addresses around.

After a reboot and a painful delay of a few minutes, after a lot of sweating, all came back up.

Webmin noticed the change of IP address, asking if I wanted to move domains on the original IP (which I did not) and all seems good!

That sounds super – thanks for letting us know how you did it!

-Eric