Changing IPs for multiple accounts on a server

Issue :

How to change the IPs of multiple accounts on a server in one go? The option in WHM is tedious. Hence, it does not serve the purpose.

Solution :

You need to have ‘root’ SSH access in order to do this.
Create a file and put the concerned accounts in it in the following format:

domainname1: user1
domainname2: user2
and so on..

Now execute the following command :

for i in `cat /path/to/file | cut -d: -f1`
do
/usr/local/cpanel/bin/swapip OLDIP NEWIP $i;
done;

Replace OLDIP and NEWIP with the corresponding values.

Filed Under: Quick fixesTechnical

Tags:

About the Author: InstaCarma is a provider of Enterprise Class Solutions for the Hosting Industry

RSSComments (0)

Trackback URL

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
InstaCarma provides outsourced web hosting technical support, helpdesk management, datacenter automation, cloud service management. Sales - 1800 810 6547 - visit www.instacarma.com