Note

You are viewing the documentation for an older release of Interworx (6.x). To see documentation for the current generally available release of Interworx, click here: 7.13.

How To: Change the Primary IP Address from the Command Line

The Migrate IP tool can be used to change the primary IP address of the server from the command line.

Prerequisites

  • The new IP must exist on the server

    New IPs can be added to the server either by editing /etc/sysconfig/network-scripts/ or by using the Network Manager. Detailed information on how to add an IP address can be found here

  • The new IP must exist in NodeWorx, under Server -> System IPs

    Information on adding IP addresses within NodeWorx can be found here

Using the Migrate IP tool

  1. Log in to the server at the command line as root, either via SSH or from the terminal

  2. Run ~iworx/bin/migrate-ip.pex

  3. Follow the prompts to input both the current and new IPs

Example:

[root@localhost ~]# ~iworx/bin/migrate-ip.pex
Enter OLD IP Address: 10.1.10.19
Enter NEW IP Address: 10.1.10.88
Updating Reseller IP access 0
Resellers updated
Revoke reseller access to old IP? [y/N] y
Reseller access revoked for old ip
Updating SiteWorx Account IP access
2 SiteWorx accounts updated
SiteWorx access revoked for old ip
Updating domain IP assignments
2 domains updated
Updating hard coded DNS entries... 0 rows updated
Updating DNS Template entries... 2 rows updated
Syncing and exporting DNS... done.
Updating apache configs... done.
Restarting Apache...
Redirecting to /bin/systemctl restart httpd.service done.
[root@localhost ~]#