We use cookies to improve your experience and analyse site traffic. Read our Privacy Policy and Cookie Policy.

Firewall rule generator

Paste IPv4 addresses or CIDR blocks and choose a format to get block rules you can review and copy. The output is generated in your browser.

Before applying any rule, make sure your own admin address is allowed. A wrong block can lock you out of a server.

0 unique entries ready.

Frequently asked questions

Will these rules lock me out of my server?
They can. Before applying any rule, make sure your own address and your management network are allowed, and keep an existing session open while you test. Review the output, and try the rules on a test server first.
Which format should I use?
Use iptables for a simple setup, ipset when the list is long, because one set rule is much faster than thousands of individual rules. Use nginx or Apache when the site is the only thing you want to protect, and CSF if you already run ConfigServer Firewall.
Are IPv6 addresses supported?
Not yet. Lines with IPv6 addresses are reported as skipped, so you can add those rules with your IPv6 tooling.