Fail2ban指南
fail2ban
安装
apt install fail2ban
配置
vim /etc/fail2ban/jail.local
[sshd]
enabled = true
port = 14213
filter = sshd
logpath = /var/log/auth.log
maxretry = 5
bantime = 12h
重启
service fail2ban restart
fail2ban-client status sshd
日志
/var/log/fail2ban.log