Plesk for Windows
Plesk for Linux
kb: how-to
ABT: Group B
Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to disable or restrict Plesk XML API?
Answer
It's possible to disable completely the XML API or allow operations only from trusted IP addresses.
To do so, add the following entries to the panel.ini file.
- To prohibit all connections via XML API:
CONFIG_TEXT: [api]
enabled = off - To allow connections via XML API only from specific IP addresses:
CONFIG_TEXT: [api]
allowedIPs = 203.0.113.2,192.0.2.2Where the
allowedIPs
setting accepts one or more IP addresses separated by commas or whitespace( )
characters.
Comments
2 comments
This restriction blocks connections through mobile apps. How to protect API but let clients connect to servers through apps?
Hi Pavel Rusanov,
Because Mobile Apps uses API to communicate with the Plesk server, there's no other workaround.
So either you use the XML API restriction and add the phone to the VPN where Plesk server is included too, or don't use the XML API restriction at all.
Note that adding the Plesk server and the smartphone to a VPN has to be done from your side because Plesk Obsidian doesn't support Plesk VPN anymore.
Please sign in to leave a comment.