Build AWS Network Firewall stateful and stateless rule group configurations.
Last verified: May 2026
Build Network Firewall rule group configs with stateful/stateless rules and domain filtering.
Required Fields
RuleGroupNameTypeCapacityRuleGroup.RulesSourceOutput will appear here...AWS Network Firewall is a managed stateful firewall service that provides deep packet inspection, intrusion prevention, and web filtering for VPC traffic. Rules are organized into rule groups — stateless rule groups evaluate each packet independently using 5-tuple matching, while stateful rule groups track connection state and support Suricata-compatible IPS rules and domain list filtering. The Network Firewall Rule Builder helps you construct both stateless and stateful rule group configurations with proper priority ordering, action settings, and rule syntax.
Your security team mandates that all production VPCs route outbound traffic through Network Firewall with domain-based allow-listing. The builder generates: a stateful rule group with a HOME_NET allow list of approved domains (github.com, npm registry, AWS APIs, monitoring/logging endpoints), default action drop for everything else. After deploy, attempted outbound to malicious domains is blocked at the firewall — preventing the entire class of 'compromised workload calls home' attacks. Rule group capacity at 5,000 (2x current need) gives room to add domains as legitimate needs emerge.
Use stateful rule groups for almost everything in 2026. Stateless rules are tricky to write correctly because you have to manually handle return traffic. Stateful rules handle bidirectional traffic automatically and support domain-based filtering (which stateless can't). Reserve stateless for very high-throughput allow/deny by IP that doesn't need state tracking.
Domain list filtering in stateful rules is the killer feature for outbound traffic control. Build an allow-list of approved domains (github.com, api.stripe.com, etc.) and DENY everything else. This prevents data exfiltration via DNS and unauthorized API calls — a real-world breach prevention pattern.
Capacity is set at rule group creation and CANNOT be reduced. If you set capacity too low and add many rules, you'll need to recreate the rule group. Always over-provision capacity at creation time — typically 2-3x what you initially need.
The builder constructs AWS Network Firewall rule groups in two flavors: stateless (with rules containing 5-tuple matching, action: pass/drop/forward) and stateful (with Suricata-compatible rules, domain lists, or default actions for connection state). Output is generated as aws network-firewall create-rule-group commands and Terraform aws_networkfirewall_rule_group resources, including capacity calculations.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.