Removing a Public IP Address from a Linux Server (CentOS 7)
Please use the “Print” function at the bottom of the page to create a PDF.
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-ens192 to delete the following entries:
Networking_IPV6="yes"
DHCPV6C="no"
IPV6INIT="yes"
IPV6_AUTOCONF="no"
IPV6ADDR=MAIN_IPV6_ADDRESS/64
IPV6_DEFAULTGW=fe80::1%ens192
IPV6ADDR_SECONDARIES=ADDITIONAL_IPv6_ADDRESS/64
Example:
vi /etc/sysconfig/network-scripts/ifcfg-ens192
Networking_IPV6="yes"
DHCPV6C="no"
IPV6INIT="yes"
IPV6_AUTOCONF="no"
IPV6ADDR=2001:ba0:2020:bce5:cdb:a034:601e:e952/64
IPV6_DEFAULTGW=fe80::1%ens192
IPV6ADDR_SECONDARIES=2001:ba0:2020:bce5:678f:bcca:b152:a6ae/64
To restart the network, enter the following command:
/etc/init.d/network restart