Removing Public IPv4 Addresses from a VPS (Debian 11)
Please use the “Print” function at the bottom of the page to create a PDF.
For VPS purchased after May 16, 2023
This article explains how to remove an additional public IPv4 address on a VPS that has Debian 11 installed.
Prerequisite
You already unassigned the additional public IPv4 or IPv6 address in the Cloud Panel.
Log in to the server.
Open the etc/systemd/network folder. To do this, type the following command:
root@debian:~# cd /etc/systemd/network
To get a list of configuration files, type the following command:
root@debian:~# ls
Delete the file that contains the configuration for the additional IPv4 address. To do this, type the following command:
root@debian:~# rm /etc/systemd/network/CONFIGURATION FILE
Example:
root@debian:~# rm /etc/systemd/network/10-additional-ip.network
To restart the systemd-networkd service, enter the following command:
root@debian:~# sudo systemctl restart systemd-networkd
Log in to the server again.
To verify that the IPv4 address has been removed, enter the following command:
root@debian:~# ip addr