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

Limit SSH connection attempts with UFW on Ubuntu—install with
apt install ufw
then add a rate-limiting rule:
ufw limit ssh
(or ufw limit 2222/tcp for a custom port) This allows 6 connections per 30 seconds per IP blocking excess attempts—enable with
ufw enable
Check with
ufw status
expecting \"22/tcp LIMIT Anywhere\" Pair with Fail2ban for bans—test by running multiple
ssh user@ip
attempts from another machine; expect blocks after 6 On Vultr this protects MySQL and phpMyAdmin from brute-force maintaining uptime—view logs with
cat /var/log/ufw.log | grep LIMIT
for blocked IPs

Back to All Tips