Reallocate private IP address

Hey Guys,

I have an expired account that has been allocated a private IP and I'd like to reallocate that IP to a new account.

However, When I choose "Allocate private address" from "Change IP Address" for the new server, I get the following error:

Failed to change IP address : SIOCSIFNETMASK: Cannot assign requested address SIOCGIFADDR: Cannot assign requested address SIOCSIFBROADCAST: Cannot assign requested address SIOCSIFBRDADDR: Cannot assign requested address SIOCSIFFLAGS: Cannot assign requested address SIOCSIFFLAGS: Cannot assign requested address

I know there's a free IP address available and the virtual interface is still there.

Can you guide me on how I go about reallocating a private IP address?

Cheers, Ryan

Status: 
Active

Comments

Make sure that the IP allocation range set at System Settings -> Server Templates -> Default Settings -> Virtual IP Addresses is for the same network as your system's primary IP address. Also, make sure that the new address you expect the domain to use is not pingable or currently active on your system ... Virtualmin will create the eth0:X interface for you automatically.

So if I reallocate an old address I should remove the existing virtual interface first?

Yes. Actually if you delete a domain in virtualmin with a private IP, it should get removed automatically...unless it was already active when you added the domain.

I Changed the IP of the existing server .. I didn't delete it. I changed the IP to the shared address but it appears that the virtual interface wasn't removed in that step from going private to shared

So in that case, another option would be to just have the new domain use the shared address, on the Change IP Address page.

I needed that private IP for an SSL installation. So I thought changing the redundant server back to shared and then allocate the new server a private address would have been straight forward if you understand what I was trying to do?

So the private IP only gets removed completely if the virtual server is deleted?

The private IP gets removed if the server is deleted, or if you switch it back to using a shared IP.

So is this IP active on your system currently, as shown by the ifconfig -a command? Also, can it be pinged?