主要参考:
https://www.cnblogs.com/xiaobo0602/p/15256131.html
更多细节看这篇:
https://www.cnblogs.com/a5idc/p/13540038.html
主要操作
新建jail.local文件(更新时jail.conf文件会被覆盖)
添加sshd规则命令
[sshd]
enabled = true
maxretry = 2
findtime = 1d
bantime = 4w
常用命令
fail2ban-client status sshd 查看被封ip
fail2ban-client set sshd unbanip 123.123.123.2 解封ip
