Firewall Rules Generator

UFW & iptables Rate Limiting DDoS Protection
Anish Nath
Firewall Configuration
Output Format
Default Policies
Quick Service Presets
SSH (22) HTTP (80) HTTPS (443) DNS (53) MySQL (3306) PostgreSQL (5432)
Custom Rule
Leave empty for any source
Current Rules
Advanced Options
UFW Commands

                                
Firewall Best Practices
Rule Order Matters

Firewall rules are processed top-to-bottom. Place more specific rules before general ones. For example, rate-limit SSH before allowing it generally.

Rate Limiting for Security

UFW: ufw limit ssh allows 6 connections per 30 seconds per IP.

iptables: Use --limit 10/minute --limit-burst 20 for similar protection.

Common Port Numbers
  • 22: SSH (Secure Shell)
  • 80: HTTP (Web Traffic)
  • 443: HTTPS (Secure Web)
  • 53: DNS (Domain Name System)
  • 3306: MySQL Database
  • 5432: PostgreSQL Database
  • 27017: MongoDB
  • 6379: Redis

Support This Free Tool

Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.

500K+ users
200+ tools
100% private
Privacy Guarantee: Private keys you enter or generate are never stored on our servers. All tools are served over HTTPS.