New Extension for Plesk. Antivirus Protection to enhance your server security. Why choose Flex Antivirus?
The XML API protocol allows remote interaction between Plesk and third-party applications through structured HTTP packets. Send your message to the Plesk endpoint, receive the operation response, and manage firewall rules programmatically without accessing the web interface.
The XML API protocol has been designed to support interaction between Plesk and third-party software remotely. To perform an operation, you must send an HTTP message with a specific structure to the Plesk endpoint: https://<your-host-or-IP>:8443/enterprise/control/agent.php. Plesk receives the message, transforms it into operation instructions, executes them, and returns the status and details of the result. For more information about packet structure and message transport, see the Client-Server Model and XML API Packets.
https://<your-host-or-IP>:8443/enterprise/control/agent.php
| Command | Parameter Description | XML packet example |
|---|---|---|
|
IP address management
|
||
| <add> |
Add an IP address to a firewall rule.
Requires specifying the rule identifier as an XML element:
<RULEID>IP</RULEID> |
Add 1.2.3.4 to the SMTP rule:
<packet><extension><call><flex-firewall-manager><add><SMTP>1.2.3.4</SMTP></add></flex-firewall-manager></call></extension></packet>
|
| <remove> |
Remove an IP address from a firewall rule.
Requires specifying the rule identifier as an XML element:
<RULEID>IP</RULEID> |
Remove 1.2.3.4 from the SMTP rule:
<packet><extension><call><flex-firewall-manager><remove><SMTP>1.2.3.4</SMTP></remove></flex-firewall-manager></call></extension></packet>
|
| <find> |
Search for an IP address in the Windows Firewall rules or in the MailEnable lists.
Requires specifying the search context:
-firewall -mailenable<PARAM>IP</PARAM> |
Search for 1.2.3.4 in the Firewall:
<packet><extension><call><flex-firewall-manager><find><firewall>1.2.3.4</firewall></find></flex-firewall-manager></call></extension></packet>
Search for 1.2.3.4 in MailEnable:
<packet><extension><call><flex-firewall-manager><find><mailenable>1.2.3.4</mailenable></find></flex-firewall-manager></call></extension></packet>
|
| <whitelist> |
Add an IP address to the exception list (whitelist).
IPs on the whitelist will never be blocked by the automatic protection system.
<whitelist>IP</whitelist> |
Add 1.2.3.4 to the whitelist:
<packet><extension><call><flex-firewall-manager><whitelist>1.2.3.4</whitelist></flex-firewall-manager></call></extension></packet>
|
|
Firewall rule management
|
||
| <enable> |
Enable a firewall rule.
Requires specifying the rule identifier
<RULEID>.<enable>RULEID</enable> |
Enable the SMTP rule:
<packet><extension><call><flex-firewall-manager><enable>SMTP</enable></flex-firewall-manager></call></extension></packet>
|
| <disable> |
Disable a firewall rule.
Requires specifying the rule identifier
<RULEID>.<disable>RULEID</disable> |
Disable the SMTP rule:
<packet><extension><call><flex-firewall-manager><disable>SMTP</disable></flex-firewall-manager></call></extension></packet>
|
| <list> |
Show the list of available rules or their identifiers.
Accepted values:
id exist<list>ID</list> |
Get the list of rule identifiers:
<packet><extension><call><flex-firewall-manager><list>id</list></flex-firewall-manager></call></extension></packet>
List names of existing rules:
<packet><extension><call><flex-firewall-manager><list>exist</list></flex-firewall-manager></call></extension></packet>
|
|
System and status control
|
||
| <on> |
Enable the Windows Firewall or enable the Firewall Manager extension.
Accepted values:
firewall extension<on>ID</on> |
Enable the Windows Firewall:
<packet><extension><call><flex-firewall-manager><on>firewall</on></flex-firewall-manager></call></extension></packet>
Enable the extension:
<packet><extension><call><flex-firewall-manager><on>extension</on></flex-firewall-manager></call></extension></packet>
|
| <off> |
Disable the Windows Firewall or disable the Firewall Manager extension.
Accepted values:
firewall extension<off>ID</off> |
Disable the Windows Firewall:
<packet><extension><call><flex-firewall-manager><off>firewall</off></flex-firewall-manager></call></extension></packet>
Disable the extension:
<packet><extension><call><flex-firewall-manager><off>extension</off></flex-firewall-manager></call></extension></packet>
|
| <status> |
Check the status of the Firewall, the extension, or the active protection modules.
Accepted values:
firewall extension protection mailenable smartermail<status>ID</status> |
Windows Firewall status:
<packet><extension><call><flex-firewall-manager><status>firewall</status></flex-firewall-manager></call></extension></packet>
Extension status:
<packet><extension><call><flex-firewall-manager><status>extension</status></flex-firewall-manager></call></extension></packet>
List status of all protections:
<packet><extension><call><flex-firewall-manager><status>protection</status></flex-firewall-manager></call></extension></packet>
MailEnable service status:
<packet><extension><call><flex-firewall-manager><status>mailenable</status></flex-firewall-manager></call></extension></packet>
SmarterMail service status:
<packet><extension><call><flex-firewall-manager><status>smartermail</status></flex-firewall-manager></call></extension></packet>
|
|
Protection modules
|
||
| <protection> |
Toggle the active/inactive state of a specific protection module.
Requires indicating which module's state to change:
SMTP IMAP POP FTP SECURITY DB RDP WEB<protection>ID</protection> |
Toggle the SMTP module:
<packet><extension><call><flex-firewall-manager><protection>SMTP</protection></flex-firewall-manager></call></extension></packet>
Toggle the RDP module:
<packet><extension><call><flex-firewall-manager><protection>RDP</protection></flex-firewall-manager></call></extension></packet>
|
|
Help
|
||
| <help> |
Show the built-in help with all available packets and their description.
|
Show full help:
<packet><extension><call><flex-firewall-manager><help/></flex-firewall-manager></call></extension></packet>
|