Removing a Public IPv6 Address in a Linux server (CentOS 8)

In this article, we'll show you how to remove an additional public IPv6 address in a Linux server.

Requirement
  • You have unassigned the additional public IPv6 address in the Cloud Panel.
  • Log on to the server.

  • To check the existing network connections, enter the following command:
    [root@localhost ~]# nmcli connection show

  • To remove the additional public IPv6 address from the network interface, enter the following command:
    [root@localhost ~]# sudo nmcli con mod Public_NETWORKINTERFACE -ipv6.addresses "IP-ADDRESS"
    Example:
    [root@localhost ~]# sudo nmcli con mod Public_ens192 -ipv6.addresses "2001:8d8:1801:1a3::2"

  • Restart the server. To do this, enter the following command:
    [root@localhost ~]# sudo reboot

  • Log on to the server again.

  • To check if the IPv6 address has been removed, type the following command:
    [root@localhost ~]# ip addr