Applicable to:
- Plesk for Linux
Question
How to enable/disable Fail2Ban and its jails in Plesk?
Answer
-
Go to Tools & Settings > IP Address Banning (Fail2Ban) > switch to the Settings tab and check/uncheck Enable intrusion detection to enable/disable Fail2Ban.
-
Click Apply.
-
Switch to the Jails tab and enable/disable required jails using the Switch on/off buttons.
Note: Jails can be switched on only when Fail2Ban is enabled.
-
Connect to a Plesk server via SSH.
-
Activate/deactivate Fail2Ban:
-
Activating Fail2Ban:
# plesk bin ip_ban --enable
-
Deactivate Fail2Ban:
# plesk bin ip_ban --disable
-
-
List all available jails:
# plesk bin ip_ban --jails
-
Enable/disable a jail using its name from step 3 with the command:
Note: Jails can be activated only when Fail2Ban is enabled.
-
Enabling a jail:
# plesk bin ip_ban --enable-jails <jail_name>
In the example below, we are enabling the 'plesk-wordpress' jail:
# plesk bin ip_ban --enable-jails plesk-wordpress
-
Disabling a jail:
# plesk bin ip_ban --disable-jails plesk-wordpress
-
Comments
3 comments
How do I disable the email Notifications (they are too many, after every minute!) but still maintain the Fail2ban running in the server?
Email notification sample: "The IP 51.79.74.171 has just been banned by Fail2Ban after 5 attempts against default."
Hi Roney Ngala,
Such setting is not available from Plesk yet, but it's something you can manage directly at Fail2Ban: /etc/fail2ban/action.d/sendmail.conf
As of now, I would recommend you to vote for this feature request.
Hi everyone,
My Plesk Obsidian Fail2Ban could not working after I did change vhosts directory. I try to enable it but no error created. It's just disable again.
SELinux in permissive mode.
Anyone can advice please.
Please sign in to leave a comment.