Before you start
Open the VNC console and copy the additional address and prefix from the VPS Network tab. Keep the existing primary address, gateway and DNS settings. The commands below useeth0 and 192.0.2.20/24 as examples. Replace them with your interface and assigned address/prefix. Do not assume that every service uses /24.
Test the additional address
Find the active interface and existing route:This change lasts only until the interface is reconfigured or the server restarts. Save it using the network manager already controlling the interface.
Save the configuration
- Netplan (Ubuntu)
- NetworkManager (Rocky/AlmaLinux)
- ifupdown (Debian)
Review the YAML files in Keep the existing primary address or DHCP setting, routes, DNS and renderer. Use spaces for YAML indentation. Check syntax, then try the settings with a rollback timeout:While the prompt is open, test a second connection and confirm only if access works. If the change is rejected or times out, verify the old configuration was restored before continuing. See the Netplan examples.
/etc/netplan/ and back up the existing directory before editing. Find the entry for the active interface.Add the extra address to its existing addresses list. This excerpt shows a primary and additional address; it is not a replacement for your complete file:Verify after a restart
During a maintenance window, restart the VPS and checkip -4 addr show dev eth0. Confirm that both the primary and additional IP still work. If not, restore the saved configuration through the console and review the network manager’s error messages.