Question
A new network interface with a new IP address has been assigned to a server, or an IP address has been updated on an existing network interface (for example, via ifconfig utility).
How to switch all subscriptions to a different IP address on a Plesk for Linux server?
Answer
For Windows, please refer to the following article.
Note: The new IP should not be added under Plesk > Tools & Settings > IP Addresses before applying the instructions below. Remove it if it's already added.
-
Connect to the server via SSH.
Note: If direct SSH access to the server is not possible, contact a server administrator for further assistance.
-
Generate a mapping file with current Plesk IP addresses by running the following command:
# plesk bin ipmanage --remap /root/ip_map_file_name
-
Open the file
/root/ip_map_file_name
for editing, for example, using vi text editor. To switch all subscriptions from the IP address203.0.113.2
to203.0.113.3
edit the file as below:Before:
venet0 203.0.113.2 255.255.255.255 -> venet0 203.0.113.2 255.255.255.255
After:
venet0 203.0.113.2 255.255.255.255 -> venet0 203.0.113.3 255.255.255.255
-
Reconfigure Plesk and its services by running the same command again:
# plesk bin ipmanage --remap /root/ip_map_file_name
Note: Network interfaces are modified in runtime and config (e.g. if the IP address is to be changed to 203.0.113.2/32, while the interface has 203.0.113.2/24, or the main interface itself is to be changed) during the execution of the plesk bin ipmanage --remap
utility. If the old IP address(es) are not needed anymore, remove them from Tools & Settings > IP Addresses and after that from the network interface manually. Vote for IP replacement on the interface on UserVoice.