Plesk for Linux
kb: how-to
ABT: Group A
Applicable to:
- Plesk for Linux
Question
How to change the IP address for domains/clients/resellers in Plesk for Linux?
Answer
Switch all existing domains to a single IP address that exists in the system:
-
Run the following command:
# for i in $(plesk bin subscription -l); do plesk bin subscription -u "$i" -ip <ip_address>; done
Note: <ip_address> here is the IP address that will be used instead of the current one. This IP must exist in the system.
Comments
8 comments
I already have the new ip address registered in plesk but i can't delete it. So what's the solution?
Error: Cannot remove the IP address 192.168.x.x because it is used by an active session. Cannot remove the IP address 192.168.x.x because it is the primary IP address of a network interface.
Update: I managed to delete the ip address using the commands:
Hello @Farid, thank you for sharing your user experience.
The recommended way is to, at first, change the interface primary IP.
Please, check this article for the reference.
I get the following error;
sh: 2: Syntax error: newline unexpected
@John Bertin
Please, try running this command instead:
When I try this it hangs after updating one subscription. If I 'command C' out of the loop and try again it does the next subscription but this is very tedious. Any ideas?
Hi @JP Kelly,
Please make sure that the command was fully copied:
If it is not helpful, try executing an alternative command:
Alternatively, submit a ticket to Plesk support in order to check if there is a misconfiguration from the server side:
https://support.plesk.com/hc/en-us/requests/new
This article does NOT work well
Please test it and fix the steps to be taken.
Please sign in to leave a comment.