Best way to inverse Server IP and Additional IP

pppplus

Verified User
Joined
Dec 19, 2008
Messages
519
Hi

What is the best way, to change an additional IP to become the main IP ?

I've actually
1.2.3.4 as Server IP
1.2.3.5 as additional IP

For all domain, I add additional IP (and all domain use now 1.2.3.5).

Now, I want 1.2.3.5 become the main IP server.

Is there a way to do this, without deleting IP from domains ?

Thanks
 
Hello,

1. So if you want change the sites with IP 1.2.3.5 to use 1.2.3.4, and sites with IP 1.2.3.4 to use 1.2.3.5, then follow this:

Code:
/usr/local/directadmin/scripts/ipswap.sh 1.2.3.5 22.22.22.22
/usr/local/directadmin/scripts/ipswap.sh 1.2.3.4 1.2.3.5
/usr/local/directadmin/scripts/ipswap.sh 22.22.22.22 1.2.3.4

22.22.22.22 - any address here, it really does not care which one if you don't have it on your server and in DNS.

2. If you want all the sites to use 1.2.3.5 simply run this:

Code:
/usr/local/directadmin/scripts/ipswap.sh 1.2.3.4 1.2.3.5


NOTE! That's up to you to change any DNS records if they are handled by remote name servers.
 
Thanks zEitEr

I just did /usr/local/directadmin/scripts/ipswap.sh 1.2.3.4 1.2.3.5

=> then I add again old IP to each domain (to keep then online during DNS propagation).

I thunk it can be a problem to switch to an existing address but no problem.
 
Back
Top