How to configure additional IP addresses on a Cloud VPS instance

This article describes how to configure additional IP addresses on a Cloud VPS instance.

When you order a Cloud VPS, you are allocated one initial IP address. However, you can purchase additional IP addresses. To use these addresses on a Cloud VPS instance, you must configure it to recognize and use the new addresses.

Adding an IP address

To add an IP address to a Cloud VPS, follow these steps:

  1. Log in to the Customer Portal.
    If you do not know how to log in to the Customer Portal, please see this article.
  2. On the menu bar, click Services and then click My Services.
  3. Locate your Cloud VPS service, and then click Manage. The Cloud VPS page appears.
  4. Under VM Controls, click Add IP.
  5. The new IP address appears under Secondary IPs.

Configuring an IP address

After you add an IP address, you must configure it. The method to do this depends on your configuration:

  • If you have cPanel and WebHost Manager installed, use WebHost Manager to configure the IP addresses.
  • If you do not have cPanel and WebHost Manager installed, you must configure the IP addresses at the operating system level.

Follow the appropriate procedure below for your own configuration.

Configuring IP addresses with WebHost Manager

To configure additional IP addresses in WebHost Manager, follow these steps:

  1. Log in to WebHost Manager.
  2. From the WebHost Manager home screen, click IP Functions, and then click Add a New IP Address.
  3. In the New IP or IP range to add text box, type the new IP address.
  4. Confirm that the Select a subnet mask for the IP or IPs above to use list box is set to 255.255.255.0.
  5. Click Submit. The new IP address should now function correctly.
Configuring IP addresses at the operating system level

To configure IP addresses at the operating system level, follow the appropriate procedure below for the Linux distribution installed on your Cloud VPS.

CentOS and Fedora

To configure an additional IP address on CentOS and Fedora, follow these steps:

  1. Log in to the Cloud VPS instance using SSH.
  2. As the root user, type the following command:
    cd /etc/sysconfig/network-scripts
  3. In your preferred text editor, create a new file named ifcfg-eth0:0.

    To add additional IP addresses, increment the second digit in the filename. For example, if you want to add additional IP addresses, you can create files named ifcfg-eth0:1, ifcfg-eth0:2, and so on.
  4. Add the following text to the file:

    DEVICE=eth0:0
    BOOTPROTO=none
    ONPARENT=yes
    IPADDR=xxx.xxx.xxx.xxx
    NETMASK=255.255.255.0
    Make sure the numbers in the DEVICE value match the numbers in the ifcfg-eth filename.
  5. Replace xxx.xxx.xxx.xxx with the IP address that you want to add to the Cloud VPS instance.
  6. Save the changes to the ifcfg-eth0:0 file, and then exit the text editor.
  7. To restart the network interfaces, type the following command:

    service network restart
  8. To verify that the new IP address is active, type the following command:

    ifconfig

    The new IP address should be associated with the eth0 interface.

Debian and Ubuntu

To configure an additional IP address on Debian and Ubuntu, follow these steps:

 

  1. Log in to the Cloud VPS instance using SSH.
  2. As the root user, open the /etc/network/interfaces file in your preferred text editor.
  3. Add the following text to the file:
    # The primary network interface
    auto eth0:0
    iface eth0:0 inet static
    address xxx.xxx.xxx.xxx
    netmask 255.255.255.0
    To add additional IP addresses, increment the second digit in the alias name. For example, if you want to add additional IP addresses, you can create aliases for eth0:1, eth0:2, and so on.
  4. Replace xxx.xxx.xxx.xxx with the IP address that you want to add to the Cloud VPS instance.
  5. Save the changes to the /etc/network/interfaces file, and then exit the text editor.
  6. To restart the network interfaces, type one of the following commands:

    • For Cloud VPS instances running Debian:
      /etc/init.d/networking restart
    • For Cloud VPS instances running Ubuntu:

      ifdown -a --exclude=lo; ifup -a --exclude=lo
      
  7. To verify that the new IP address is active, type the following command:

    ifconfig

    The new IP address should be associated with the eth0 interface.

Other Linux distributions

For other Linux distributions, consult its documentation for the steps to configure additional IP addresses in the networking settings.

Releasing an IP address

If you no longer want to use an additional IP address, you can release it. To do this, follow these steps:

  1. Remove the network interface settings for the IP address, and then restart the network interfaces.
  2. Log in to the Customer Portal.
    If you do not know how to log in to the Customer Portal, please see this article.
  3. On the menu bar, click Services and then click My Services.
  4. Locate your Cloud VPS service, and then click Manage. The Cloud VPS page appears.
  5. Under Secondary IPs, locate the IP address that you want to release, and then click Release IP.

Additional IP addresses

If you need more than one IP address added, you must contact customer support. Additional IP addresses can be purchased. Reach out for support via LiveChat, or by filling out a support ticket where a customer support representative will be able to provide further guidance on adding additional IP addresses.

Get Cloud Hosting

Article Details

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.