yum update -y
安装
yum install fail2ban -y
启用
systemctl enable fail2ban
打开配置文件
vim /etc/fail2ban/jail.local
在配置文件中添加以下内容
[DEFAULT]
# Ban hosts for one hour:
bantime = 43200
findtime = 600
maxretry = 1
# Override /etc/fail2ban/jail.d/00-firewalld.conf:
banaction = iptables-multiport
[sshd]
enabled = true
----------------------
重启fail2ban
systemctl restart fail2ban
查看fail2ban状态
fail2ban-client status
fail2ban-client status sshd
linux安装fail2ban 防止SSH密码爆破
最新推荐文章于 2024-06-13 10:39:21 发布