Fail2ban指南

Admin留言 | 贡献2023年10月16日 (一) 05:37的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

安装

apt install fail2ban

配置

vim /etc/fail2ban/jail.local

SSH

[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