Skip to main content

Add extra IPv4 addresses to your VPS

Learn how to add, remove, and persist additional IPv4 addresses on Linux and Windows VPS.

Teodor avatar
Written by Teodor
Updated over a month ago

Every LumaDock VPS comes with one public IPv4 and one IPv6 address already configured. If you buy extra IPv4s, they appear in your dashboard but are not added to your server automatically. This guide shows you how to assign them, remove them, and keep them persistent across reboots.

Whenever you see example values like 203.0.113.10, 203.0.113.5, or interface names like ens18, replace them with the values shown in your LumaDock panel.


Check your current network configuration

Before you make changes, verify your current IP setup. This helps identify which addresses are already active and ensures later updates apply correctly.

ip addr show

This confirms which addresses are already in use and helps you spot issues early.


Debian and Ubuntu

Debian based systems use the ip command for temporary changes and Netplan for persistent configuration. Some commands take effect immediately, while others must be written to a config file so they survive a reboot.



Step 1 - Identify your network interface

List all interfaces so you know where to attach the extra IPv4:

ip link show

Look for the interface that is UP (for example ens18 or eth0). That is where you will assign the new IP.



Step 2 - Add an IPv4 address temporarily

This adds the IP immediately but only until the next reboot:

sudo ip addr add 203.0.113.10/32 dev ens18

The address becomes active at once.



Step 3 - Remove an IPv4 address

Use this when you no longer need the temporary address:

sudo ip addr del 203.0.113.10/32 dev ens18

Traffic to that IP stops reaching your server right away.



Step 4 - Make the address persistent with Netplan

To keep the IP after a reboot, edit or create the Netplan config file:

sudo nano /etc/netplan/60-custom.yaml

Example layout:

network:   version: 2   ethernets:     ens18:       addresses:         - 203.0.113.5/24       gateway4: 203.0.113.1       nameservers:         addresses:           - 8.8.8.8           - 1.1.1.1

Apply the changes:

sudo netplan apply


RHEL, CentOS, AlmaLinux, Rocky Linux, Fedora

These systems typically use NetworkManager for network configuration, though legacy network scripts may still be present on older versions.



Step 1 - Identify your network connection

List all known connections:

sudo nmcli connection show

Find your primary connection name (for example "System eth0").



Step 2 - Add an IPv4 address temporarily

Use this to add an extra IPv4 address:

sudo nmcli connection modify "System eth0" +ipv4.addresses 203.0.113.10/32 sudo nmcli connection up "System eth0"

The address becomes active immediately.



Step 3 - Remove an IPv4 address

Use this when you want to remove the temporary IP:

sudo nmcli connection modify "System eth0" -ipv4.addresses 203.0.113.10/32 sudo nmcli connection up "System eth0"

The address is removed instantly.



Step 4 - Make the address persistent using legacy config files

Only applies if your system still uses /etc/sysconfig/network-scripts:

sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0

Add:

IPADDR1=203.0.113.10 PREFIX1=32

Then restart networking:

sudo systemctl restart network


Arch Linux

Arch uses ip for temporary assignments and systemd-networkd for persistent configuration.



Step 1 - Add an IPv4 address temporarily

sudo ip addr add 203.0.113.10/32 dev eth0

This makes the address active immediately.



Step 2 - Remove an IPv4 address

sudo ip addr del 203.0.113.10/32 dev eth0

The address is deleted instantly.



Step 3 - Make the address persistent (systemd-networkd)

Create or edit the network unit:

sudo mkdir -p /etc/systemd/network/ sudo nano /etc/systemd/network/20-wired.network

Example:

[Match] Name=eth0  [Network] Address=203.0.113.5/24 Gateway=203.0.113.1 DNS=8.8.8.8

Restart networking:

sudo systemctl restart systemd-networkd


openSUSE

openSUSE supports ip for temporary changes and either wicked or /etc/sysconfig based configs for persistent settings.



Step 1 - Add an IPv4 address temporarily

sudo ip addr add 203.0.113.10/32 dev eth0



Step 2 - Remove an IPv4 address

sudo ip addr del 203.0.113.10/32 dev eth0



Step 3 - Make the address persistent

Edit the interface config:

sudo nano /etc/sysconfig/network/ifcfg-eth0

Add a new address entry (exact syntax can vary slightly by version, but usually follows this pattern):

IPADDR1='203.0.113.10/32'

Reload wicked:

sudo wicked ifreload all


Windows Server (2019, 2022, 2025)

Windows Server manages IP assignments through PowerShell. Changes take effect immediately and persist automatically.



Step 1 - View active interfaces

Get-NetIPAddress | Select InterfaceAlias,IPAddress

Use this to confirm which interface you want to modify.



Step 2 - Add an IPv4 address

New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 203.0.113.10 -PrefixLength 32



Step 3 - Remove an IPv4 address

Remove-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 203.0.113.10 -Confirm:$false
Did this answer your question?