Plesk Change IP address – How to do

Looking for steps in Plesk to change IP address? We can help you.

We often get requests from our customers regarding changing the IP address on their Plesk servers.

Here at Bobcares, we handle such requests as a part of our Server Management Services for our customers. Today we will see how our Support Engineers do this for our customers.

How to Change IP address in Plesk

We will see the steps that our Support Engineers follow to change IP addresses in Linux servers and Windows servers.

Steps for Changing IP address in Linux servers

We must not add any Ip under Plesk > Tools & Settings > IP Addresses before doing the following steps:

1. Firstly we have to connect to the server via SSH

2. Then we have to generate a mapping file with current Plesk IP addresses using the following command:

# plesk bin reconfigurator /root/ip_map_file_name

3. After that we have to edit the file /root/ip_map_file_name

For example:

To change the IP address 203.0.113.6 to 203.0.113.7:

venet0 203.0.113.6 255.255.255.255 -> venet0 203.0.113.7 255.255.255.255

4. Finally, to reconfigure Plesk and the services we can use the following command:

# plesk bin reconfigurator /root/ip_map_file_name

Steps for Changing IP address in windows

1. First, log in to Plesk.

2. And go Tools & Settings and take IP Addresses and remove the new IP.

3. Then connect to the server using RDP.

4. Now we will add the new IP address from Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings. From there right-click on a network interface > Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties > Advanced > Add.

5. After that we can go to Start > All Programs > Plesk Reconfigurator.

6. From there select Change server IP addresses.

7. In the section we can select IP addresses to be changed (i.e., select IP addresses that are to be replaced.)

8. Then we have to map each selected IP to a new IP address:8.1.

For mapping to an existing IP address, we can use the section Existing Address.

For mapping to a new IP address that will be created during mapping, we can use the section Create New IP Address.

9. Finally click Next.

Now the Plesk installation will be reconfigured to use the newly specified IP addresses in place of the old ones. All related records in the database will be updated, network adapter settings will be changed (the old IP addresses are removed), FTP and web servers will be reconfigured, and DNS records will be updated accordingly.

If the change fails during execution, all the changes must be rolled back.

Common error

At times while doing the above steps for changing IP address we may end up with the following error:

Plesk IP address cannot be removed:
Error: Cannot remove the IP address 203.0.113.6 because it is the primary IP address of a network interface.
ifmng failed: cannot delete main IP on interface

This happens because the Primary IP address of the network interface cannot be removed by design.

How to fix

Note: This solution is only for servers with at least 2 IP addresses on them.

We can use the following steps to fix this error:

1. Firstly we need to connect to the Plesk server via SSH.

2. We must create a backup of the Plesk database before making any changes.

The following command can be used for this:

 plesk db dump psa > /root/psa_backup.sql

3. After that we can connect to the Plesk database using the following command:

#plesk db

4. Then we can modify the IP_Addresses table as given below:

In the following example:

203.0.113.6 – the current main (primary) IP address
203.0.113.7 – the new main (primary) IP address that is going to replace 203.0.113.6

We need to change the value of the main field  true for the new IP address:

mysql> UPDATE IP_Addresses SET main='true' WHERE ip_address='203.0.113.7';

After that, we can change the value of the main field to false for the old IP address:

mysql> UPDATE IP_Addresses SET main='false' WHERE ip_address='203.0.113.6';

[Need assistance? We can help you]

Conclusion

In short, we saw how our Support Techs Change IP addresses in Plesk for our customers.

The post Plesk Change IP address – How to do appeared first on Bobcares.


Go to Source of this post
Author Of this post: Sushali Dasan
Title Of post: Plesk Change IP address – How to do
Author Link: {authorlink}