For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.us.ovhcloud.com/en/bare-metal-cloud/vps/configuring-ip-aliasing.md.
  • English

How to configure IP aliasing

View as Markdown

IP aliasing is a special network configuration for your OVHcloud servers that allows you to associate multiple IP addresses with a single network interface.

Warning

NOTE: OVHcloud provides services for which you are responsible for their configuration and management. You are therefore responsible for their proper functioning.

This tutorial is designed to help you as much as possible with common tasks. If you are having difficulty performing these actions, please contact a specialized service provider. OVHcloud cannot provide you with technical support in this regard.

 

Requirements

  • A Virtual Private Server on your OVHcloud account
  • An Additional IP address or an Additional IP block
  • Administrative access (sudo) via SSH or GUI to your server
  • Basic networking and administration knowledge
Warning

NOTE: Additional IP addresses are currently unavailable for Virtual Private Servers in Local Zones.

 

Instructions

The following sections contain the configurations for the most commonly used distributions/operating systems. The first step is always to log in to your server via SSH or a GUI login session (RDP for a Windows VPS). The examples below presume you are logged in as a user with elevated permissions (Administrator/sudo).

Info

Concerning different distribution releases, please note that the proper procedure to configure your network interface, as well as the file names, may have been subject to change. We recommend consulting the manuals and knowledge resources of the respective OS versions, if you experience any issues.

Please take note of the following terminology that will be used in code examples and instructions of the guide sections below:

TermDescriptionExamples
ADDITIONAL_IPAn Additional IP address assigned to your service203.0.113.0
NETWORK_INTERFACEThe name of the network interfaceeth0, ens3
IDID of the IP alias, starting with 0 (depending on the number of additional IPs there are to configure)0, 1

 

Select the tab below that corresponds to your operating system:

Debian 11
Debian 12+, Ubuntu 22.04+
AlmaLinux / Rocky Linux
Fedora 42
cPanel
Plesk
Windows Servers

Debian 11

Step 1: Disable automatic network configuration

Open the following file path with a text editor. In our example, we are using nano:

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

Enter the following line, then save and exit the editor:

network: {config:disabled}

Creating this configuration file will prevent changes to your network configuration from being made automatically.

 

Step 2: Create a backup

By default, the configuration file is located in the path etc\network\interfaces.d.

In our example, our file is called 50-cloud-init, so we make a copy of the 50-cloud-init file using the following command:

sudo cp /etc/network/interfaces.d/50-cloud-init /etc/network/interfaces.d/50-cloud-init.bak

In case of a mistake, you will be able to revert the changes using the commands below:

sudo rm -f /etc/network/interfaces.d/50-cloud-init
sudo cp /etc/network/interfaces.d/50-cloud-init.bak /etc/network/interfaces.d/50-cloud-init

 

Step 3: Edit the network configuration file

You can verify your network interface name with this command:

ip a

Open the network configuration file for editing with the following command:

sudo nano /etc/network/interfaces.d/50-cloud-init

To configure your Additional IP, you need to add a virtual interface or ethernet alias to your network interface. In our example, our interface is called eth0, so our first alias is eth0:0. Do this for each Additional IP you wish to configure.

Do not modify the existing lines in the configuration file; simply add your Additional IP to the file as follows, replacing NETWORK_INTERFACE, ID, and ADDITIONAL_IP with your own values:

auto NETWORK_INTERFACE:ID
iface NETWORK_INTERFACE:ID inet static
address ADDITIONAL_IP
netmask 255.255.255.255

If you are configuring more than one Additional IP, your configuration file should look like this:

auto NETWORK_INTERFACE:ID
iface NETWORK_INTERFACE:ID inet static
address ADDITIONAL_IP1
address ADDITIONAL_IP2
netmask 255.255.255.255
Configuration example:
auto eth0:0
iface eth0:0 inet static
address 203.0.113.0
netmask 255.255.255.255

 

Step 4: Restart the interface

Apply the changes with the following command:

sudo systemctl restart networking

 

Troubleshooting

First, restart your server from the command line or its GUI. If you are still unable to establish a connection from the public network to your alias IP and suspect a network problem, you need to reboot the server in rescue mode. Then you can set up the Additional IP address directly on the server.

Once you are connected to your server via SSH, enter the following command:

ifconfig ens3:0 ADDITIONAL_IP netmask 255.255.255.255 broadcast ADDITIONAL_IP up

To test the connection, simply ping your Additional IP from the outside. If it responds in rescue mode, which probably means that there is a configuration error. If, however, the IP is still not working, please inform our support teams by creating a support request for further investigations.

 

Go further

Browse all the Virtual Private Servers guides.

Browse the rest of the OVHcloud US documentation for guides on our other products and services.

Learn more about VPS on the OVHcloud US website.