Security

Linux Firewall Generator

Select common services and generate UFW, nftables, or iptables rules.

🔒 Runs locally in your browserNo signup · No AI backend

Services

If you are connected remotely over SSH, make sure your SSH port is allowed before applying a restrictive firewall policy.

Rules

How to use the Linux Firewall Generator

Choose a firewall type, select the services or custom ports you need, then generate rules you can review before applying. If you administer the server remotely, allow SSH before enabling a restrictive default policy.

UFW vs. iptables

UFW provides a simpler interface for common host firewall tasks, while iptables exposes lower-level packet filtering controls. Use the format that matches the firewall already managed on your system.

Before applying firewall rules

Confirm the management port, source network and protocol. Keep an existing administrative session open while testing a new ruleset so you can recover from an accidental lockout.

Verify the result

After applying changes, inspect active rules and test the intended service from an appropriate client rather than assuming a generated command was accepted.