IT tips fail2ban

提供:onayami
lastb

sudo cat /var/log/auth.log | grep "Failed password"

sudo apt install fail2ban

#サービスの開始
sudo fail2ban-client start

#サービスの停止
sudo fail2ban-client stop


sudo vim /etc/fail2ban/jail.local

[sshd]
enabled = true
bantime  = 3600
findtime  = 20
maxretry = 3

sudo fail2ban-client restart