Plesk for Linux
An IP address (in this example, it is 203.0.113.2) is set as public for a private IP address at Tools & Settings > IP Addresses.
When removing this IP address, the operation fails with:
PLESK_ERROR: Error: IP address 203.0.113.2 cannot be removed because it is used by DNS zone of one or more domains
The IP address is used as public for the private IP address which has a website hosted on it.
Apply one of the following solutions:
Note: Make sure that the IP address you are going to remove is not used by any domain at Tools & Settings > IP Addresses.
Removing the IP address via Plesk
In Plesk, go to Tools & Settings > IP Addresses > <private_ip_address>.
Remove the public IP address from the Public IP address field.
Click OK. Wait for the process to complete.
Once the process is completed, remove the public IP address from IP Addresses.
Click <private_ip_address> and specify the public IP address back. Click OK.
Removing the IP address manually from the system
Connect to the Plesk server via SSH.
Identify the interface on which the IP address is located:
# ip a
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
inet 192.0.2.2/32 brd 10.39.81.154 scope global eth0
inet 203.0.113.2/8 scope global eth0:1
Remove the IP address from the interface:
# ip addr del 203.0.113.2/8 dev eth0
Connect to the Plesk database:
# plesk db
Remove the old IP address:
MYSQL_LIN: mysql> delete from IP_Addresses where ip_address='203.0.113.2';