Removing a Public IP Address from a Linux Server (CentOS 6)

To remove a public IP address from a Linux server, proceed as follows:

Requirement

You have unassigned the additional public IP address in the Cloud Panel.

  • Log in to the server as an administrator.

  • To remove the additional IPv6 address, you must specify in /etc/sysconfig/network-scripts/ifcfg-eth0 to delete the following entries:

Networking_IPV6="yes"
DHCPV6C="no"
IPV6INIT="yes"
IPV6_AUTOCONF="no"
IPV6ADDR=MAIN_IPV6_ADDRESS/64
IPV6_DEFAULTGW=fe80::1%eth0
IPV6ADDR_SECONDARIES=ADDITIONAL_IPv6_ADDRESS/64

Example:

vi /etc/sysconfig/network-scripts/ifcfg-eth0
NETWORKING_IPV6="yes"
DHCPV6C="no"
IPV6INIT="yes"
IPV6_AUTOCONF="no"
IPV6ADDR=2001:ba0:2020:53c8:ac66:35c6:7a84:bd18/64
IPV6_DEFAULTGW=fe80::1%eth0
IPV6ADDR_SECONDARIES=2001:ba0:2020:53c8:cb04:94a5:24d:23ff
  • To restart the network, enter the following command:

/etc/init.d/network restart