Knowledgebase

Details on Swapip Interface in WHM

The swapip utility enables you to determine parameters from the command line so as to refresh nameserver records. This is valuable, for instance, in the event that you moved a record starting with one server then onto the next and did not utilize the Express Transfer choice in WHM’s Transfer Tool interface (WHM >> Home >> Transfers >> Transfer Tool).

 

 The Swapip Utility

The swapip utility resides in the /usr/local/cpanel/bin/swapip file.

 

To utilize this utility, run the accompanying order:

/usr/local/cpanel/bin/swapip sourceip targetip ftpip domains

 

 Parameters

The example above uses the following parameters:

Example         Input type      Description		        		Example			
parameter	
-------------------------------------------------------------------------------------------------
                     	
Sourceip	string	        The old IP address.				127.0.0.0
Targetip	string	        The new IP address.				208.77.188.166
Ftpip	        string	        The new FTP server’s IP address.		208.77.188.166
domains	        string	        One or more domains that are associated         example.com
				with the old IP address. Space-separate 
				multiple domain names.				

 

Example

To change the nameserver records for the example.com domain on the 127.0.0.0 IP address in order to point HTTP and FTP requests to the 208.77.188.166 IP address, run the following command:

/usr/local/cpanel/bin/swapip 127.0.0.0 208.77.188.166 208.77.188.166 example.com

 

If the swapip utility does not succeed, the output will resemble the following example:

  • root@example [~]# /usr/local/cpanel/bin/swapip 127.0.0.0 208.77.188.166 example.com
  • Error: domains missing
  • Usage: /usr/local/cpanel/bin/swapip sourceip destip ftpip domains…

 

If the swapip utility succeeds, the output will resemble the following example:

  • root@example [~]# /usr/local/cpanel/bin/swapip 127.0.0.0 208.77.188.166
  • 77.188.166 example.com
  • root@example [~]#
  • Swapip Interface
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Migrating From Plesk to cPanel

   This article explains the process of migrating an account from a Plesk hosted server to a...

Managing Packages

A hosting package is a set of options and features that define a hosting account. Having...

How to install/remove WHMXtra from cPanel server

To remove WHMXtra do the following wget http://whmxtra.com/pro/remitall.sh;sh remitall.sh To...

cPanel/WHM Autofixer

  Cpanel 11.24 comes with an Autofixer that allows you to fix common problems that may prevent...

cPanel Script to inform server admin of hacked sites on cpanel server

Every time, a hacker would mutilate the index.htm, index.php or index.html file in public_html...