• 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 for MySQL

I followed instruction from that link, and tried to add filter and jail with plesk.

Filter is like this
View attachment 12954

But when I try to add Jail, I got this error


In mysqld.log I already got a huge ammount of Access denied logs, and there are two different kind of those.
Code:
2017-06-16T10:51:20.141402Z 77735 [Note] Access denied for user 'db'@'177.73.50.50' (using password: YES)
2017-06-16T12:48:00.383079Z 42 [Note] Access denied for user 'root'@'cable-88-99-29-229.static.sbb.rs' (using password: YES)

Probably I need to adjust regex somehow, but not have experience with this, so if someone already did this, please share :). I would be grateful
This regex works:
Code:
failregex = ^.*\[Warning\] Access denied for user .*@'<HOST>'.*\(using password: YES\)$

On ubuntu 20.04, Plesk 18 and MariaDB server.
 
Back
Top