New Extension for Plesk. Antivirus Protection to enhance your server security. Why choose Flex Antivirus?
Run Firewall Manager commands directly from the Windows Server command line. Ideal for automation scripts, scheduled tasks, and remote administration.
The CLI is designed for integrating Plesk with third-party applications and automation scripts. The administrator user can run all command-line utilities from the server console without depending on Plesk's web interface (GUI).
plesk sbin modules\flex-firewall-manager\ffm <parameters>
plesk ext flex-firewall-manager <parameters>
%plesk_dir%\admin\bin\modules\flex-firewall-manager\ffm <parameters>
| Command | Parameter | Description | Usage example |
|---|---|---|---|
|
IP address management
|
|||
| --add | <IP> <RULEID> |
Add an IP address to a firewall rule.
Requires specifying the rule identifier
<RULEID> as the second parameter. |
Add 1.2.3.4 to the SMTP rule:
>
plesk ext flex-firewall-manager --add 1.2.3.4 SMTP
|
| --remove | <IP> <RULEID> |
Remove an IP address from a firewall rule.
Requires specifying the rule identifier
<RULEID> as the second parameter. |
Remove 1.2.3.4 from the SMTP rule:
>
plesk ext flex-firewall-manager --remove 1.2.3.4 SMTP
|
| --whitelist | <IP> |
Add an IP address to the exception list (whitelist).
IPs on the whitelist will never be blocked by the automatic protection system.
|
Add 1.2.3.4 to the whitelist:
>
plesk ext flex-firewall-manager --whitelist 1.2.3.4
|
| --find | <IP> -firewall -mailenable |
Search for an IP address in the Windows Firewall rules or in the MailEnable lists.
Requires specifying the search context:
-firewall or -mailenable. |
Search for 1.2.3.4 in the Firewall:
>
plesk ext flex-firewall-manager --find 1.2.3.4 -firewall
Search for 1.2.3.4 in MailEnable:
>
plesk ext flex-firewall-manager --find 1.2.3.4 -mailenable
|
|
Firewall rule management
|
|||
| --enable | <RULEID> |
Enable a firewall rule.
Requires specifying the rule identifier
<RULEID>. |
Enable the SMTP rule:
>
plesk ext flex-firewall-manager --enable SMTP
|
| --disable | <RULEID> |
Disable a firewall rule.
Requires specifying the rule identifier
<RULEID>. |
Disable the SMTP rule:
>
plesk ext flex-firewall-manager --disable SMTP
|
| --list | <id> <exist> |
Show the list of available rules or their identifiers.
Use
id to get the rule identifiers, or exist to list the names of rules currently active in the system. |
Get the list of rule identifiers:
>
plesk ext flex-firewall-manager --list id
List names of existing rules:
>
plesk ext flex-firewall-manager --list exist
|
|
System and status control
|
|||
| --on | <firewall> <extension> |
Enable the Windows Firewall or enable the Firewall Manager extension.
Use
firewall to enable the Windows Firewall or extension to enable the extension. |
Enable the Windows Firewall:
>
plesk ext flex-firewall-manager --on firewall
Enable the extension:
>
plesk ext flex-firewall-manager --on extension
|
| --off | <firewall> <extension> |
Disable the Windows Firewall or disable the Firewall Manager extension.
Use
firewall to stop the Windows Firewall or extension to disable the extension. |
Disable the Windows Firewall:
>
plesk ext flex-firewall-manager --off firewall
Disable the extension:
>
plesk ext flex-firewall-manager --off extension
|
| --status | <firewall> <extension> <protection> <mailenable> <smartermail> |
Check the status of the Windows Firewall, the extension, or the active protection modules.
Supports the contexts:
firewall, extension, protection, mailenable, and smartermail. |
Windows Firewall status:
>
plesk ext flex-firewall-manager --status firewall
Extension status:
>
plesk ext flex-firewall-manager --status extension
List status of all protections:
>
plesk ext flex-firewall-manager --status protection
MailEnable service status:
>
plesk ext flex-firewall-manager --status mailenable
SmarterMail service status:
>
plesk ext flex-firewall-manager --status smartermail
|
|
Protection modules
|
|||
| --protection | <modulo> |
Toggle the active/inactive state of a specific protection module.
Available modules:
SMTP IMAP POP FTP SECURITY DB RDP WEB |
Toggle the SMTP module:
>
plesk ext flex-firewall-manager --protection SMTP
Toggle the RDP module:
>
plesk ext flex-firewall-manager --protection RDP
|
|
Help
|
|||
| --help | — |
Show the built-in help with all available commands and their description.
|
Show full help:
>
plesk ext flex-firewall-manager --help
|
Automation: You can schedule the execution of CLI commands using the Windows Task Scheduler to perform periodic maintenance or automatic blocks based on logs.