centos7安装fail2ban,


 

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

 

 

 

相关内容

    暂无相关文章