• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Plesk Fail2Ban Rule for Joomla

t.van.der.plas

Basic Pleskian
Hi all,

i have been trying to add some custom rule to fail2ban to block joomla brute force attacks - the error.php in joomla logs directory show the following entries (ip is shown in full):

2021-08-24T13:47:54+00:00 INFO 1xx.1xx.3x.1xx joomlafailure Username and password do not match or you do not have an account yet. ("admin")

the ruleset should - at least as far as i understand fail2ban - look like this:

FILTER:
[Definition]
failregex = ^.*INFO <HOST>.*joomlafailure.*(Benutzername|Username).*

JAIL:
[joomla-login-errors]
enabled = true
filter = joomla-login-errors
action = iptables-multiport[name="joomla-login-errors", port="http,https"]
logpath = /var/www/vhosts/*/httpdocs/tmp/error.php
/var/www/vhosts/*/httpdocs/logs/error.php
/var/www/vhosts/*/httpdocs/administrator/logs/error.php
maxretry = 3

unfortunately, those attempts are not blocked - did some of you guys succeed in defining a joomla jail?
 
You can vote for this feature here Fail2ban Joomla Login Support
And please pay attention to this comment:

This is impossible. Because Joomla returns an HTTP 200 when a login fails, where WordPress (as it should) returns a 401. Fail2Ban checks for those 401 return codes and bans accordingly.

Because Joomla always returns 200 (regardless of whether the login succeeded or not) there is no way to check for failed logins.
 
Hi Igor,

many thanks - in the feature request you mentioned, there was some comment:

You can use Fail2ban with Joomla, but will need a regx creating to read joomla logs
/var/www/vhosts/*/httpdocs/log/error.php


so íve been trying to get this up & running somehow
 
Back
Top