fail2ban是一款很是實用的安全軟件,經過監視系統日誌,設置錯誤登錄次數,可阻擋暴力密碼攻擊。php
1.安裝epel
yum install epel-release -yvim
2.安裝fail2ban
yum install fail2ban -y安全
3.配置
cd /etc/fail2ban/
cp jail.conf jail.local
vim jail.local
[DEFAULT]
bantime = 3600
[sshd]
enabled = truessh
maxretry = 3日誌
4.啓動
systemctl start fail2ban
systemctl enable fail2banget
5.查看日誌
fail2ban-client statuscli
tailf /var/log/fail2ban.log軟件