For extra IPs to work, you must configure them inside the operating system of the server you use.
First, you need to find the name of the extra network interface card (NIC) by running the command:
ip add
Look for the extra NIC name (e.g.: eth1)

To temporarily configure an IPv4 “1.2.3.4”, you can run:
ip addr add 1.2.3.4/32 dev eth1
Please note that this configuration will not survive a reboot.
To configure the first IPv6 address of an IPv6 netblock 2a01:4f8:2c17:2c::/64, you should run:
ip addr add 2a01:4f8:2c17:2c::1/128 dev eth1
How do i permanently configure an extra IP?
On Debian based distributions (Ubuntu versions before 20.04, Debian):
-
Access the server via SSH.
-
Edit the configuration file (e.g.: 50-cloud-init) in the folder /etc/network/interfaces.d:
sudo nano /etc/network/interfaces.d/50-cloud-init
- Paste the following configuration at the bottom of the file and replace your.Extra.IP with your extra IP:
IPv4: (Change the 'eth1' with the name of your extra NIC)
auto eth1
iface eth1 inet static
address your.Extra.IP/32
For example:

IPv6:
iface eth1 inet6 static
address Your.IP.V6.Address
netmask 64
Save and close the file (Ctrl+X)
- Now you should restart your network. Caution: This will reset your network connection:
sudo service networking restart
Ubuntu 20.04 and higher:
-
Access the server via SSH.
-
Edit the configuration file (e.g.: 50-cloud-init.yaml) in the folder /etc/netplan:
sudo nano /etc/netplan/50-cloud-init.yaml
- Add your extra NIC configuration at the bottom of the file using this structure: (Change the 'eth1' with the name of your extra NIC)
IPv4:
eth1:
addresses:
- Your.IP.Address/32
For example:

IPv6:
eth1:
addresses:
- Your.IP.V6.Address/64
Save and close the file (Ctrl+X)
- Now you should restart your network. Caution: This will reset your network connection:
sudo netplan apply
On RHEL based distributions (Fedora, CentOS):
-
Access the server via SSH.
-
Create the configuration file and open an editor: (Change the 'eth1' with the name of your extra NIC)
touch /etc/sysconfig/network-scripts/ifcfg-eth1
vi /etc/sysconfig/network-scripts/ifcfg-eth1
- Paste the following configuration into the editor and replace your.Extra.IP with your extra IP:
IPv4:
BOOTPROTO=static
DEVICE=eth1
IPADDR=your.Extra.IP
PREFIX=32
TYPE=Ethernet
USERCTL=no
ONBOOT=yes
IPv6:
BOOTPROTO=none
DEVICE=eth1
ONBOOT=yes
IPV6ADDR=one IPv6 address of the subnet, e.g. 2a01:4f9:0:2a1::2/64
IPV6INIT=yes
- Now you should restart your network. Caution: This will reset your network connection:
sudo systemctl restart NetworkManager
- In some newer versions of CentOS distributions (such as CentOS 9 and 10), you sometimes need to configure the routing table to enable extra IP addresses: (Change the 'eth1' with the name of your extra NIC)
nmcli connection modify "cloud-init eth1" ipv4.route-table 200
nmcli connection modify "cloud-init eth1" ipv4.routing-rules "priority 100 from your.extra.ip.address table 200"
nmcli connection up "cloud-init eth1"