IP aliasing is a special network configuration for your Cloud VPS, which allows you to associate multiple IP addresses with a single network interface.

The following sections contain the configurations for the most commonly used distributions/operating systems.

Concerning current distributions, please note that the proper procedure to configure your network interface may be subject to change. We recommend to consult the manuals and knowledge resources of the respective OS versions if you experience any issues.

Debian 9

Step 1 Disable automatic network configuration

First, open the following file, as shown below:

# nano /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg

Next, edit the file with the configuration shown below. This will prevent changes from being made to your network configuration automatically.

network: {config: disabled}
Step 2 Edit the network configuration file

Next, open the network configuration file for editing with the following command:

# nano /etc/network/interfaces.d/50-cloud-init.cfg

Then edit the file with the following configuration:

Note that the names of the network interfaces in our examples may differ from your own. Please adjust to your appropriate interface names.

auto ens3
iface ens3 inet dhcp

auto ens3:0
iface ens3:0 inet static
address addition IP 0
netmask 255.255.255.255

auto ens3:1
iface ens3:1 inet static
address addition IP 1
netmask 255.255.255.255

Apply settings:

# /etc/init.d/networking restart

Ubuntu 18.04

Each additional IP address will need its own line within this file. The configuration file for your additional IP addresses should be called “50-cloud-init.yaml”.

Step 1 Create the configuration file

Connect to your server via SSH and run the following command:

# nano /etc/netplan/50-cloud-init.yaml

Next, edit the file with the content below:

network:
    version: 2
    ethernets:
        your_network_interface:
            dhcp4: true
            match:
                macaddress: fa:xx:xx:xx:xx:63
            set-name: your_network_interface
            addresses:
            - your_additional_ip/32

Finally, save and close the file.

Then apply config:

# netplan apply
# netplan try

Repeat this procedure for each additional IP address.

CentOS and Fedora (25 and earlier)

Step 1 Create the source file

First, make a copy of the source file so that you can use it as a template:

# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
Step 2 Edit the source file

You can now modify the eth0:0 file in order to replace the IP:

# nano /etc/sysconfig/network-scripts/ifcfg-eth0:0

First, replace the name of the device, then replace the existing IP with the additional IP you have received:

DEVICE="eth0:0"
ONBOOT="yes"
BOOTPROTO="none" # For CentOS use "static"
IPADDR="ADDITIONAL_IP"
NETMASK="255.255.255.255"
BROADCAST="ADDITIONAL_IP"
Step 3 Restart the interface

You now need to restart your interface:

# ifup eth0:0

Windows Server 2016/2019

Step 1 Check the main IP configuration

First of all we need to recover the information of the main IP address:

Step 2 Change the IPv4 Properties

Now we must change the IP properties from automatically configuration” to a “static” configuration manually:

Now we can define the IP information obtained previously:

Step 3 Add the failover IP in the “Advanced configuration” section

Here we must to define the additional IP information and the correspond netmask (normally the netmask is -> 255.255.255.255)

Step 4 Rebooting the network interface

First we do the disabling process:

Then we do the enabling process:

Step 5 Checking the new network configuration

Using the console and the ipconfig command we can check the new network configuration:

cPanel (on CentOS 6)

Step 1 Create the source file

First, make a copy of the source file, so that you can revert at any time:

# cp /etc/ips /etc/ips.bak
Step 2 Edit the source file

You then need to edit the /etc/ips file:

# nano /etc/ips

Then add the addition IP to the file:

ADDITIONAL_IP:255.255.255.255:ADDITIONAL_IP

Next, add the IP in /etc/ipaddrpool :

ADDITIONAL_IP
Step 3 Restart the interface

You now need to restart your interface:

# /etc/init.d/ipaliases restart

Plesk Onyx 17.x

Step 1 Access to the IP Addresses” management inside the control panel

Access to the Tools & Settings > IP Addresses section:

Step 2 Add the additional IP information:

Click on the Add IP Address button:

Then put the additional IP information in the form and press OK.

Step 3 Check the current IP configuration inside Plesk panel:

Troubleshooting

If you are unable to establish a connection from the public network to your alias IP and suspect a network problem, please reboot the server in Rescue Mode and setup the alias directly on the server.

In order to do that, once you have rebooted your server in Rescue Mode, please enter the following command:

# ifconfig ens3:0 ADDITIONAL_IP netmask 255.255.255.255 broadcast ADDITIONAL_IP up

Replace ADDITIONAL_IP with the actual IP.

Next, simply ping your IP from the outside. If it works, it probably means that there is a configuration error that requires to be fixed. If, on the contrary, the IP is still not working, please inform our support team by creating a support request in your Client Area for further investigations.

Tagged: