ESC

Start typing to search across invoices, services, domains, tickets, and more...

Search... Ctrl+K
Network & IP

How to Add an Additional IP Address on a Linux VPS: Bind, Persist, Verify and Remove

7 steps 10 min read 1042 views 80
On this page

After ordering extra IPs, you must bind them inside the operating system before they work. This guide shows how to add an additional IP address on a Linux VPS: temporary binding with ip addr, persistent configuration on Ubuntu (Netplan), Debian (/etc/network/interfaces) and CentOS/Rocky/AlmaLinux (NetworkManager nmcli), and how to verify and remove an IP.

First confirm the assigned IP, prefix length and gateway in the client area: log in → My Products & Services → select the server → Manage. If you cannot find them, open a ticket and support will provide them. The examples use 203.0.113.10/24; replace it with your real address.

Step 1: Find the Network Interface Name and Current IPs

Interface names vary (eth0, ens3, ens18, enp1s0…). Check the primary interface and the addresses already bound to it.

ip -br addr show
ip route show default

The interface that carries the default route is your primary NIC. We use eth0 below; substitute your own name.

Step 2: Add an IP Temporarily with ip addr (Lost on Reboot)

The ip command binds an extra IP instantly, which is handy for a quick test. It does not survive a reboot.

ip addr add 203.0.113.10/24 dev eth0
ip -4 addr show dev eth0

If the extra IP is in a different subnet from the main IP, add only the address. Do not add a second default gateway, or you will end up with two default routes and broken networking.

Step 3: Persist the Additional IP on Ubuntu with Netplan

Ubuntu 18.04+ uses Netplan. Files live in /etc/netplan/ (often 50-cloud-init.yaml or 01-netcfg.yaml). Append the new IP to the addresses list:

network:
  version: 2
  ethernets:
    eth0:
      addresses:
        - 198.51.100.5/24
        - 203.0.113.10/24
      routes:
        - to: default
          via: 198.51.100.1
      nameservers:
        addresses: [8.8.8.8, 1.1.1.1]

Test first, then apply:

netplan try
netplan apply
YAML is indentation-sensitive and accepts spaces only. If cloud-init manages networking, your changes may be overwritten at boot; create /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg containing network: {config: disabled}.

Step 4: Persist the IP on Debian with /etc/network/interfaces

Debian uses ifupdown by default. Edit /etc/network/interfaces and add a second stanza under the primary interface:

auto eth0
iface eth0 inet static
    address 198.51.100.5/24
    gateway 198.51.100.1

iface eth0 inet static
    address 203.0.113.10/24

Multiple iface stanzas for one interface are supported by ifupdown. Restart networking (make sure the VNC console works before doing this remotely):

systemctl restart networking

Step 5: Persist the IP on CentOS, Rocky or AlmaLinux with nmcli

RHEL-family systems use NetworkManager. List connections, then append the IP with +ipv4.addresses:

nmcli connection show
nmcli connection modify eth0 +ipv4.addresses 203.0.113.10/24
nmcli connection up eth0

The connection NAME may differ from the device name (for example "System eth0"); quote it if it contains spaces.

Step 6: Verify the Additional IP Works

Confirm the address is bound, then test connectivity using it as the source address:

ip -4 addr show dev eth0
ping -c 4 -I 203.0.113.10 8.8.8.8
curl --interface 203.0.113.10 https://ifconfig.me

curl should print the new IP. Reboot once to make sure the persistent configuration is applied.

Step 7: Remove an IP Address You No Longer Need

Use ip addr del for a temporary removal. For a permanent removal, delete the line from the config file or remove it with nmcli:

ip addr del 203.0.113.10/24 dev eth0
nmcli connection modify eth0 -ipv4.addresses 203.0.113.10/24
nmcli connection up eth0

FAQ

The new IP does not respond to ping from outside. Why?

Check that the firewall (ufw, firewalld, iptables) allows traffic and that the prefix and gateway match what was assigned. Some networks bind IPs to a specific MAC; open a ticket if unsure.

The extra IP disappears after a reboot.

You probably used only ip addr, or cloud-init overwrote the config. Follow Steps 3–5 and check the cloud-init settings.

SSH dropped after I changed the network config.

Log in via the VNC console in the client area, restore your backup and restart networking. Always cp the original file before editing.

Still stuck? Open a ticket with IMIDC 24/7 technical support and include your ip addr output and OS version.

Was this answer helpful?

Related Tutorials