Removing additional public IPv4 or IPv6 addresses from a Dedicated Server or Bare Metal Server (Rocky Linux 9, Rocky Linux 10, AlmaLinux 9, and AlmaLinux 10)
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 additional public IPv4 or IPv6 addresses from a Dedicated Server or Bare Metal Server running Rocky Linux 9, Rocky Linux 10, AlmaLinux 9, or AlmaLinux 10. To do this, complete the following:
Requirements
- You have unassigned the additional public IPv4 or IPv6 address in the Cloud Panel.
- You have created a backup.
Determining the connection name
- Log in to the server as an administrator.
To determine the correct name of the connection, enter the following command:
[root@localhost ~]# nmcli device show
- Make a note of the connection name. This is listed in the GENERAL.CONNECTION: entry. To exit the display, press the q key.
Removing additional IPv4 or IPv6 addresses
To remove a specific additional IPv4 address from the configuration, adapt the following command and then enter it:
[root@localhost ~]# nmcli connection modify "CONNECTION_NAME" -ipv4.addresses "ADDITIONAL_IPv4_ADDRESS/32"
Examples:
[root@localhost ~]# nmcli connection modify "eth0" -ipv4.addresses "85.215.253.93/32"
[root@localhost ~]# nmcli connection modify "Wired connection 1" -ipv4.addresses "85.215.253.93/32"
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 remove a specific additional IPv6 address from the configuration, adapt the following command and then enter it:
[root@localhost ~]# nmcli connection modify "CONNECTION_NAME" -ipv6.addresses "ADDITIONAL_IPv6_ADDRESS/64"
Examples:
[root@localhost ~]# nmcli connection modify "eth0" -ipv6.addresses "2a01:239:0:16a::2/64"
[root@localhost ~]# nmcli connection modify "Wired connection 1" -ipv6.addresses "2a01:239:0:16a::2/64"
For the changes to take effect, you must reload the connection and bring it up. To do this, adapt the second command and then enter both commands:
[root@localhost ~]# nmcli connection reload
[root@localhost ~]# nmcli connection up CONNECTION_NAMEExamples:
[root@localhost ~]# nmcli connection reload
[root@localhost ~]# nmcli connection up eth0[root@localhost ~]# nmcli connection reload
[root@localhost ~]# nmcli connection up "Wired connection 1"To check whether the additional IP address has been removed, enter the following command:
[root@localhost ~]# ip addr
Note
If the server is no longer reachable due to a configuration error, you can log in to the server using the VNC Console and correct the configuration. You will find instructions in the following article: