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