• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Question Fail2Ban custom jail

kojot

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