• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx

  • We are developing a new feature in Plesk that will help you promote your websites or business on social media. We want to conduct a one-hour online UX test to present the prototype and collect feedback. If you are interested in the feature, please book a meeting via this link.
    Thank you in advance!
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Delete/Remove primary ip

Manu80

New Pleskian
Hello,
I have Plesk Onyx 17.8.11 Update #21 with OS Ubuntu 16.04.5 LTS.
I have multiple IP inside the plesk.
I'm try to delete one IP, the first IP (used for installing the server).
From GUI I try to delete but I receive this error:

Cannot remove the IP address x.x.x.x because it is the primary IP address of a network interface

It's possible to remove these IP from CLI ?

Thanks
Manuel
 
Hello IgoR, I try hte KB article, but when I try to end to remove the IP, I receive this error: ifmng failed: 10.40.40.122: cannot delete main IP on interface

I think is because my ubuntu server use this 10.40.40.122 as primary main IP into interface settings ...

I think I need to modify settings into /etc/network/interfaces ?

Manuel
 
  1. Create Plesk database backup ;

  2. Make sure that the new IP addresses are not registered in Plesk on the Plesk > Tools & Settings > IP Addresses page. If they are, remove them before proceeding further;

  3. Run the utility reconfigurator.pl to create the mapping template file:
    Code:
    # /usr/local/psa/bin/reconfigurator.pl ipaddresses.map
  4. Edit this file and set the appropriate IP mapping. The mapping file matches the full list of the currently configured IP addresses with new ones in the following format:

    Code:
    eth0:192.0.2.2 255.255.255.0 -> eth0:192.0.2.2 255.255.255.0
    eth0:192.0.2.3 255.255.255.0 -> eth0:192.0.2.3 255.255.255.0
    Edit the file and replace an IP address in the right part of a string with one from the new set:
    Code:
    eth0:192.0.2.2 255.255.255.0 -> eth0:new_ip_address 255.255.255.0
  5. Once the mapping file contains an appropriate arrangement, run reconfigurator.pl again:
    Code:
    # /usr/local/psa/bin/reconfigurator.pl ipaddresses.map
    It will read the mapping file and perform the replacement according to its content.
  6. Rebuild configuration for Plesk services:
    For Plesk 12.5 and newer:
    Code:
    # plesk bin repair -r
    For Plesk 12.0 and below:
    Code:
    # /usr/local/psa/bin/repair -r
For more information:
How to replace IP address for domains/clients/resellers in Plesk for Linux
 
Hello,
T
  1. Create Plesk database backup ;

  2. Make sure that the new IP addresses are not registered in Plesk on the Plesk > Tools & Settings > IP Addresses page. If they are, remove them before proceeding further;

  3. Run the utility reconfigurator.pl to create the mapping template file:
    Code:
    # /usr/local/psa/bin/reconfigurator.pl ipaddresses.map
  4. Edit this file and set the appropriate IP mapping. The mapping file matches the full list of the currently configured IP addresses with new ones in the following format:

    Code:
    eth0:192.0.2.2 255.255.255.0 -> eth0:192.0.2.2 255.255.255.0
    eth0:192.0.2.3 255.255.255.0 -> eth0:192.0.2.3 255.255.255.0
    Edit the file and replace an IP address in the right part of a string with one from the new set:
    Code:
    eth0:192.0.2.2 255.255.255.0 -> eth0:new_ip_address 255.255.255.0
  5. Once the mapping file contains an appropriate arrangement, run reconfigurator.pl again:
    Code:
    # /usr/local/psa/bin/reconfigurator.pl ipaddresses.map
    It will read the mapping file and perform the replacement according to its content.
  6. Rebuild configuration for Plesk services:
    For Plesk 12.5 and newer:
    Code:
    # plesk bin repair -r
    For Plesk 12.0 and below:
    Code:
    # /usr/local/psa/bin/repair -r
For more information:
How to replace IP address for domains/clients/resellers in Plesk for Linux


Hello,
the new IP addresses are registered and used into plesk :|
 
Have you updated the database how the article descripes?

How to change the main (primary) IP address in Plesk for Linux

Yes,
before this the error are "Error: Cannot remove the IP address 203.0.113.2 because it is the primary IP address of a network interface.".
After steps into this article (after step 6), the error are "ifmng failed: 10.40.40.122: cannot delete main IP on interface".

I think the problem are because the ip that I need to remove are the primary in the S.O. Ubuntu ..

into /etc/network/interfaces I have

iface ens192 inet static
address 10.40.40.122
netmask xxx
network xxx
gateway xxx
ecc

iface ens192:1 inet static
address 10.40.40.11
netmask 255.255.255.0
 
Try following:
  1. Identify the interface on which the IP address is located:
    Code:
    # ip a
    2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/void
    inet 192.0.2.2/32 brd 10.39.81.154 scope global venet0:0
    inet 203.0.113.2/8 scope global venet0
  2. Remove the IP address from the interface:
    Code:
    # ip addr del 203.0.113.2/8 dev venet0
  3. Connect to a Plesk database:
    Code:
    plesk db
  4. Remove the old IP-adress:
    Code:
    mysql> delete from IP_Addresses where ip_address='203.0.113.2';


For more information:
Unable to remove an IP address via Plesk: IP address 203.0.113.2 cannot be removed because it is used by DNS zone of one or more domains.
 
Back
Top