BuycPanel Blog

BuycPanel Blog

Latest news and updates

Details on Swapip Interface in WHM

Posted by Allura on 18 06 2019.

Overview
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 parameter
Input type
Description
ExampleSourceip
string
The old IP address.
127.0.0.0Targetip
string
The new IP address.
208.77.188.166Ftpip
string
The new FTP server’s IP address.
208.77.188.166domains
string
One or more domains that are associated with the old IP address. Space-separate multiple domain names.
example.com 
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…

Overview

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 parameterInput typeDescriptionExample
SourceipstringThe old IP address.127.0.0.0
TargetipstringThe new IP address.208.77.188.166
FtpipstringThe new FTP server’s IP address.208.77.188.166
domainsstringOne or more domains that are associated with the old IP address. Space-separate multiple domain names.example.com

 

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 [~]#