Firewall Rule Generator — v4.1.1

Generate Linux, macOS, and Windows firewall scripts. Everything runs client side.
Use the blue buttons or the dropdown below.
Platform
Generating Linux scripts. Switch to macOS or Windows for their native outputs.
General
Services / Ports
Pick services you want to allow (TCP unless noted)
Admin / IP
Exempt an admin IP so you do not lock yourself out
Country Blocking
Select countries to block. Country blocking uses ipset for iptables and native sets for nftables. UFW will skip this feature.
IPv6 lists may not be available for all providers. The generator will skip gracefully.
Profile
Profiles save OS, engine, firewall type, role, services, countries, IP mode.