Free Tool
nftables DDoS Protection Rule Generator
Generate modern nftables rulesets for Linux DDoS protection. nftables replaces iptables with better performance, atomic rule updates, and a cleaner syntax.
nft -c -f nftables.conf to check syntax without applying. Keep out-of-band access available. On systemd systems, rules persist via /etc/nftables.conf and systemctl enable nftables.
nftables vs iptables - Why Migrate?
| Feature | iptables | nftables |
|---|---|---|
| Atomic rule replacement | No (rule-by-rule) | Yes (entire ruleset) |
| Performance at scale | Linear matching | Optimized set lookups |
| IPv4 + IPv6 unified | Separate commands | inet family handles both |
| Named sets/maps | Requires ipset | Built-in |
| Kernel API | Legacy xtables | Modern nf_tables |
| Syntax | Flat CLI flags | Structured, readable |
| Tracing/debugging | Limited | Built-in trace support |
| Distro default (2024+) | Being deprecated | Default in most distros |
Protect your infrastructure with Flowtriq
Detect DDoS attacks in under 1 second. Classify attack types automatically. Get instant alerts.
Start your free trial →Deployment Guide
Follow these steps to safely deploy your generated nftables rules on a production server.
Check for errors with nft -c -f rules.nft. The -c flag validates without applying.
Schedule an automatic rollback: at now + 5 minutes <<< "nft flush ruleset". If you get locked out, rules flush automatically.
Run nft -f rules.nft and test SSH immediately. Cancel the safety timeout once confirmed.
Save with cp rules.nft /etc/nftables.conf && systemctl enable nftables. On Debian/Ubuntu, the nftables service loads /etc/nftables.conf at boot automatically.
Run nft list ruleset to see active rules and packet/byte counters confirming traffic is hitting your rules.
FAQ