Articles in this section

How to manage Fail2Ban and its jails in Plesk for Linux

kb: how-to Plesk for Linux ABT: Group B

Applicable to:

  • Plesk for Linux

Question

How to enable/disable Fail2Ban and its jails in Plesk?

Answer

Managing fail2Ban and its jails via Plesk

 

  1. Log in to Plesk.

  2. Go to Tools & Settings > IP Address Banning (Fail2Ban) > switch to the Settings tab and check/uncheck Enable intrusion detection to enable/disable Fail2Ban.

  3. Click Apply.




  4. 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.




Managing fail2Ban and its jails via a command-line interface

 

  1. Connect to your Plesk server via SSH.

  2. Activate/deactivate Fail2Ban:

    • Activating Fail2Ban:

      # plesk bin ip_ban --enable

    • Deactivate Fail2Ban:

      # plesk bin ip_ban --disable

  3. List all available jails:

    # plesk bin ip_ban --jails

  4. Enable/disable a jail using its name from step 3 and 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

Additional Information

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.