-
Install:
sudo apt install fail2banorsudo yum install fail2ban -
Copy default config:
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local -
Edit jail.local and enable
sshdprotection -
Start Fail2Ban:
sudo systemctl start fail2ban -
Enable at boot:
sudo systemctl enable fail2ban
Fail2Ban automatically blocks IPs after repeated failed login attempts.
