Removing an additional public IPv4 or IPv6 address from a Dedicated Server or Bare Metal Server (Debian 12, Debian 13, Ubuntu 22.04, Ubuntu 24.04, and Ubuntu 26.04)
Please use the “Print” function at the bottom of the page to create a PDF.
Valid for Dedicated Servers and Bare Metal Servers managed in the Cloud Panel.
This article explains how to remove an additional public IPv4 or IPv6 address from the configuration of a Dedicated Server or Bare Metal Server running Debian 12, Debian 13, Ubuntu 22.04, Ubuntu 24.04, or Ubuntu 26.04.
Note
The following articles explain how to establish an encrypted network connection to your server using Secure Shell (SSH):
Establishing an SSH connection to your Linux server from a Microsoft Windows computer
Establishing an SSH connection to your Linux server from a Linux computer
Requirements
- You have unassigned the additional public IPv4 or IPv6 address in the Cloud Panel.
- You have logged in to the server as root, or with administrative privileges.
- You have created a backup of the /etc/network/interfaces file.
Open the /etc/network/interfaces file with the vi editor.
root@localhost:~# vi /etc/network/interfaces
- To switch to insert mode, press the i key.
- In the /etc/network/interfaces file, delete the additional IPv4 or IPv6 address that you want to remove.
Caution
Make sure that you only remove an additional IPv4 or IPv6 address, and not the main IPv4 or main IPv6 address. Otherwise, the server will only be reachable through the VNC Console or the serial console.
- To leave insert mode and switch to command mode, press the ESC key.
- To exit vi and save the file, enter the command :wq and then press Enter.
Restart the server to apply the changes. To do this, enter the following command:
root@localhost:~# systemctl reboot
To check whether the additional IP address has been removed, enter the following command:
root@localhost:~# ip addr