README.md
README.md
$ sudo apt-get install fail2ban $ cd /etc/fail2ban/
$ sudo nano jail.local
--> Add or modify the SSH section to define the rules inside jail.local:
[ssh]
enabled = true
port = ssh # Use the actual SSH port if it's different from default
filter = sshd
logpath = /var/log/auth.log
maxretry = 3 # Number of failed login attempts allowed before banning
bantime = 3600 # Ban duration in seconds (adjust as needed)
$ sudo systemctl restart fail2ban