MySQL

Create an SSH jail by creating the file /etc/fail2ban/jail.d/mysql.local. Paste in the following config, adapt it to your needs

[mysqld]
log = /var/log/mysql/access.log
log_error = /var/log/mysql/error.log
log_warnings = 2

Start and reload SSHD, and then add your jail

sudo fail2ban-client start
sudo fail2ban-client reload
sudo fail2ban-client add mysql

Revision #1
Created 24 November 2024 18:14:07 by Nicolas
Updated 16 December 2024 11:42:28 by Nicolas