sudo ufw limit 22/tcp comment 'SSH rate limit'

Category: VPS Management

sudo ufw limit 22/tcp comment 'SSH rate limit'

Rate-limit SSH connections to block brute force

limit applies ufw's rate limiter: connections are normally allowed, but an IP that opens 6 or more connections within 30 seconds is dropped, blunting brute-force password attacks without a full firewall ban. This is the firewall-level complement to fail2ban. The comment flag names the rule in ufw status output.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.