Web Hosting & VPS Tips

Unleash Your Server Potential with Expert Insights

Hosting provided by: Cloudways
Free to Try! Up to 40% Off!

Category: VPS Setup

Adjust Fail2ban’s findtime on Ubuntu—install with
apt install fail2ban
then edit /etc/fail2ban/jail local with
nano /etc/fail2ban/jail.local
:
[sshd]\nenabled = true\nport = 22\nfilter = sshd\nlogpath = /var/log/auth.log\nmaxretry = 3\nfindtime = 120\nbantime = 600
Restart with
systemctl restart fail2ban
open SSH with
ufw allow 22
This bans after 3 fails in 2 minutes (120s) for 10 minutes (600s)—test with
ssh user@ip
check
fail2ban-client status sshd
On Linode this tightens SSH security—adjust findtime higher (e g 600s) if false positives occur ensuring MySQL and FTP uptime

Back to All Tips