Unleash Your Server Potential with Expert Insights
Over $120 Million in Payouts!Sponsored by: FundingTicks
Sponsored by: FundingTicks
Category: VPS Setup
apt install fail2ban -y
/etc/fail2ban/jail d/mysql conf
vianano /etc/fail2ban/jail.d/mysql.conf
[mysql]\nenabled = true\nport = 3306\nfilter = mysqld-auth\nlogpath = /var/log/mysql/error.log\nmaxretry = 5\nbantime = 86400
cp /etc/fail2ban/filter.d/mysqld-auth.conf /etc/fail2ban/filter.d/mysqld-auth.local
systemctl restart fail2ban
ufw allow 3306
fail2ban-client status mysql