Skip to content

AWS Network Firewall limiations

0

There are hard limits for AWS Network Firewall, namely:

  • Maximum stateful rule group capacity. For more information: 30,000
  • Maximum number of stateful rule groups per firewall policy: 20

Let's say I want to use AWS Managed Rules and also create my own rules and this is not possible, because AWS is providing 20 rule groups. Each set of managed rule groups counts as a single rule group toward the maximum number of stateful rule groups per firewall policy. So there is no space left for my own rule groups. What is really intereseting, it is not possible to use all of 20 AWS Managed rule groups, because when I try to use it it will exceed 30.000 capacity.

My question is, why these limits are so low?

asked 4 years ago1K views

2 Answers
0

You are right regarding trying to manage all stateful managed rule group will hit the 30000 hard limit. You can think rule groups as containers of rule groups, therefore you can group your rule groups by functionality (for example botnet, malware) and type (stateful/stateless) under separate policies which will give you the flexibility:

  • not to hit the limits
  • manage your rule groups and policies easily
AWS

answered 4 years ago

  • I don't understand. You can nest rule groups inside rule groups? How? I'm trying to find a way around this 20 rule group limit.

0

There have been some updates since this question was originally posted that are worth highlighting.

Rule group limits

You can still associate a maximum of 20 stateful rule groups with a single firewall policy, and any single stateful rule group can have up to 30,000 stateful rules. However, the maximum number of stateful rules per firewall policy per account per Region can now be increased from 30,000 (default) to 50,000. This means you can have up to 50,000 stateful rules spread across the 20 stateful rule groups associated to the firewall policy. This limit can be increased directly from the Service Quotas console — look for the quota named Stateful rules per policy.

Rule optimization

Two other quotas worth keeping in mind are the maximum character length of a Suricata rule (8,192) and the maximum size of a Suricata-compatible rules string for a rule group (2,000,000 bytes). When writing your own Suricata rule strings, you can look for ways to maximize the use of these per-rule limits. For example:

  • Rather than writing one pass tls rule for each allowed domain, you can use Perl Compatible Regular Expressions (PCRE) in a single rule to match on multiple domains — reducing your overall stateful rule count.
  • In a strict order policy, you can use the alert; keyword on a pass rule to alert on pass when needed, instead of adding a duplicate alert rule above the pass rule.

Managed rule groups

Rather than adding all available managed rule groups, the recommendation is to only add the ones that provide a security benefit to your specific environment. Adding every managed rule group may be casting too wide of a net. A balance between managed and custom rule groups allows you to tailor the firewall policy to your environment's actual needs, while staying within the rule group and capacity limits.

Since this question was first asked, Network Firewall has also added new paid managed rule group options:

  • Active Threat Defense — Provides automated, intelligence-driven protection against dynamic, ongoing threat activities observed across AWS infrastructure. Announcement
  • Partner Managed Rule Groups — Deploy expert-curated, automatically updated security rules from AWS Partners directly within your firewall policies via AWS Marketplace. Announcement
AWS

answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.