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

Question Fail2Ban custom jail

CoyoteKG

Regular Pleskian
I have one problematic site with some guestbook page which is spamed.
We added google recaptcha, and on that way we solved that problem,

But now in logs I see a lot of logs like
mod_fcgid: stderr: PHP Notice: Undefined index: Anfangsposition in /var/www/vhosts/kringers.at/httpdocs/guestbox0.93/gbshow.php on line 24
mod_fcgid: stderr: PHP Notice: Undefined index: Anfangsposition in /var/www/vhosts/kringers.at/httpdocs/guestbox0.93/gbshow.php on line 24, referer: http://www.kringers.at/guestbox0.93/guestbox.php

I think that maybe bots trying to pass that recaptcha, but I don't know how to ban it with Fail2ban.

I added firstly filter like
[Definition]
failregex = ^<HOST> .* "GET /guestbox0.93/guestbox.php?* HTTP/.*" 200
ignoreregex =

And after that I tried to create jail with that filter, but got errors. Obviously I did not created filter properly.
Code:
Error: f2bmng failed: ERROR NOK: ('kringers',)
ERROR NOK: ('Unable to compile regular expression \'^(?:::f{4,6}:)?(?P<host>[\\w\\-.^_]*\\w) .* "GET /guestbox0.93/guestbox.php?* HTTP/.*" 200\'',)
ERROR:f2bmng:Command '['/usr/bin/fail2ban-client', 'reload', 'kringers']' returned non-zero exit status 255
ERROR:f2bmng:Failed to reload following jails due to errors in configuration: kringers

Can you help me how to solve those attacks?
 

Attachments

  • logs.zip
    1.1 MB · Views: 0
Back
Top