• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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