This document is a shortened form of the original Fail2ban documentation.
sudo apt install fail2ban -yCopy the jail configuration from this repository to the Fail2ban configuration directory.
fail2ban/jail.d/->/etc/fail2ban/jail.d/
The ssh.local configuration enables SSH protection with the following settings:
| Setting | Value | Description |
|---|---|---|
banaction |
ufw |
Uses UFW firewall for banning |
maxretry |
5 |
Failed attempts before ban |
findtime |
10m |
Time window for counting attempts |
bantime |
1d |
Duration of the ban |
sudo systemctl restart fail2banfail2ban-client set <jailname> unbanip <IP>