Why it matters
Writing the same policy in ufw, nftables and iptables syntax is error-prone, and the classic mistake, enabling the firewall without an SSH rule, locks you out of your own server.
Write the rules once in plain words and get all three, checked for the usual mistakes.
How to use it
- Type or paste your input; the example shows the format.
- Press Build rules. Results also update as you type.
- Read the summary line, then the table, notes or output below it.
- Copy or download what you need. Nothing leaves this page.
FAQ
Which should I use?
ufw on Ubuntu for simple servers; nftables on modern Debian, RHEL and anything new. iptables is legacy but still common in scripts and containers.
Why does Docker ignore my ufw rules?
Docker writes its own iptables rules for published ports, ahead of ufw. Publish to 127.0.0.1 or use the DOCKER-USER chain.
What does limit do?
It allows a few connections per source per minute and blocks bursts, which slows brute-force attempts on SSH.
Is my input uploaded?
No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.
Can I rely on the result?
It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.