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

Log limited connections with UFW on Ubuntu—install with
apt install ufw
limit SSH with
ufw limit 22/tcp
enable with
ufw enable
and set logging to high with
ufw logging high
Check with
ufw status
—expect \"22/tcp LIMIT Anywhere\" Test with multiple
ssh user@ip
attempts—view logs with
grep \"LIMIT\" /var/log/ufw.log
expecting \"[UFW LIMIT BLOCK] SRC=203 0 113 1\" On DigitalOcean this protects MySQL and phpMyAdmin—adjust limit with /etc/ufw/ufw conf (LOGLEVEL=high) ensuring uptime by logging rate-limited threats without full bans

Back to All Tips