Install Fail2Ban
Install and configure Fail2Ban for brute-force protection
Overview
Install and configure Fail2Ban for brute-force protection
Commands
This will install Fail2Ban, continue?
sudo apt-get update && sudo apt-get install -y fail2ban
sudo systemctl enable --now fail2ban
Use Cases
Protect public-facing servers against SSH brute-force attacks.
FAQ
- Locked out yourself → Unban via VNC with
sudo fail2ban-client set sshd unbanip <IP>