centos7安装fail2ban
程序员文章站
2022-05-09 17:18:53
fail2ban是一款非常实用的安全软件,通过监视系统日志,设置错误登陆次数,可阻挡暴力密码攻击。 1.安装epelyum install epel-release -y 2.安装fail2banyum install fail2ban -y 3.配置cd /etc/fail2ban/cp jail ......
fail2ban是一款非常实用的安全软件,通过监视系统日志,设置错误登陆次数,可阻挡暴力密码攻击。
1.安装epel
yum install epel-release -y
2.安装fail2ban
yum install fail2ban -y
3.配置
cd /etc/fail2ban/
cp jail.conf jail.local
vim jail.local
[default]
bantime = 3600
[sshd]
enabled = true
maxretry = 3
4.启动
systemctl start fail2ban
systemctl enable fail2ban
5.查看日志
fail2ban-client status
tailf /var/log/fail2ban.log