1-Installation
apt-get install fail2ban
2-Configuration :
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
Activer la protection SSH
nano /etc/fail2ban/jail.local
[sshd] enable = true port = ssh logpath = %(sshd_log)s backend = %(sshd_backend)s maxretry = 6
3-Exploitation
Visualiser les règles active
fail2ban-client status
Visualiser les blocages par règle
fail2ban-client status sshd
Débannir une IP pour une regle
fail2ban-client set sshd unbanip 117.20.10.10