Applicable to:
- Plesk for Linux
Question
How to change the IP address of the Plesk server?
Answer
For Windows, please refer the following article: How to change IP address for multiple subscriptions in Plesk for Windows
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 command:
# plesk bin reconfigurator /root/ip_map_file_name
-
Edit the file
/root/ip_map_file_name
, for example, to change IP address203.0.113.2
to203.0.113.3
:Before edit:
CONFIG_TEXT: venet0 203.0.113.2 255.255.255.255 -> venet0 203.0.113.2 255.255.255.255
After edit:
CONFIG_TEXT: 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 command again:
# plesk bin reconfigurator /root/ip_map_file_name
Note: reconfigurator.pl
script updates IP addresses in Plesk but does not do anything with the server network interface. If the old IP address(es) are not needed anymore, remove them from the network interface manually. Vote for IP replacement on interface on UserVoice.
Additional information
How to change the main (primary) IP address in Plesk for Linux
Comments
10 comments
can you add a link to the windows version of this doc?
Hello Christopher Danks
For Windows, there's a separate article.
Here's the corresponding documentation.
Thanks for the document, it works fine over Debian. But I have one question, when we execute the IP change:
And check /etc/network/interfaces
I can see:
iface ens32:1 inet static
address x.x.x.x
netmask x.x.x.x
auto ens32:1
It is not necessary to add the gateway, network and broadcast?
Thanks in advance
Hello SSP
I've compared it with a similar network subinterface on a test server. Looks like it's expected.
Also, let me note that Plesk reconfiguration doesn't change these settings by design. Feel free to make adjustments if necessary.
Thanks a lot. Can anyone explain who can we delete the old ip once the ip is changed? I have debian server and after a reboot the old IP comes again. And this is a very big problem as the domains start to send mail from that IP, SPF records are wrong and mail is returned.
So it will be a big help for me if somebody can tell me how to delete the old IP permanently from the server to use only the new one.
I delete the old IP:
ip addr del x.x.x.x/24 dev ens192
But after reboot the IP comes again:
Where x.x.x.x is the old IP and y.y.y.y is the new one
Thank you in advance
Hello SSP
Most probably you have a virtual server and this address is managed from the outside, Consider contacting server provider.
Hi Ivan,
That is not the problem. If you **only** follow the KB article to change the IP for Plesk on a Debian box (and in other linux distros too I think), next time you reboot the server the old IP will come to the server.
Also with the KB you don´t change the network, the broadcast and the gateway (if they are different), which will be critical in the server.
So the Kb works to change the IP of plesk but if you don´t set the server correctly, you will have a big problem once the server is rebooted if the old IP still works.
Best regards
Hello,
I have 2 IPs in the plesk and would like to change the current main IP to swap to the other IP as the main IP.
Both the IPs are already in the system.
How do i delete the current second IP, then go change the current main ip to a new ip?
Thanks,
Gary
Hello SSP
Yes, you're right, indeed some attention to the server's network configuration is still required.
The aim of this utility is to set up Plesk to work with the new server configuration.
Hello Gary Gopinathan,
You can follow this guide https://support.plesk.com/hc/en-us/articles/115002822565. Here is the documentation as well
https://docs.plesk.com/en-US/onyx/advanced-administration-guide-linux/system-maintenance/changing-ip-addresses.68622/
Please sign in to leave a comment.