• Help & contact
    • Unlock security benefits
      %

    For VPS purchased after May 16, 2023

    This article explains how to remove an additional public IPv4 address on a VPS that has CentOS 7 installed.

    Prerequisite

    You already unassigned the additional public IPv4 or IPv6 address in the Cloud Panel.

    • Log in to the server.

    • Open the /etc/sysconfig/network-scripts folder. To do this, type the following command:

      [root@localhost ~]# cd /etc/sysconfig/network-scripts

    • To get a list of configuration files, type the following command:

      [root@localhost network-scripts]# ls

    • Make sure that the configuration file contains only the data of the additional IPv4 address. The name of the configuration file contains the interface name and a consecutive digit. To do this, open the file with the vi editor.

      root@localhost ~]# cd PATH/ifcfg-INTERFACE-FORTLAUFENDE_ZIFFER

      Example:

      [root@localhost ~]# cd /etc/sysconfig/network-scripts/ifcfg-eth0

    • Delete the file that contains the configuration for the additional IPv4 address. To do this, enter the following command:

      [root@localhost ~]# rm PATH/ifcfg-INTERFACE-FORTLAUFENDE_ZIFFER

      Example:

      [root@localhost ~]# rm /etc/sysconfig/network-scripts/ifcfg-eth0

    • Perform a reboot of the server. To do this, enter the following command:

      [root@localhost ~]# systemctl reboot

    • Log in to the server again.

    • To verify that the IPv4 address has been removed, enter the following command:

      [root@localhost ~]# ip addr