firewall_rule_groups={allow-domains={description="Allow specific domains using rules_string"capacity=300type="STATEFUL"rule_group={rules_source={rules_string=<<-EOT# Allow AWS domainspasstlsanyany->anyany(msg:"Allow amazonaws.com";tls.sni;content:"amazonaws.com";nocase;endswith;sid:100001;rev:1;)EOT}stateful_rule_options={rule_order="STRICT_ORDER"}}},forward-web={description="Forward web traffic to stateful rules"capacity=100type="STATELESS"rule_group={rules_source={stateless_rules_and_custom_actions={stateless_rules=[{priority=1rule_definition={actions=["aws:forward_to_sfe"]match_attributes={protocols=[6]# TCPsources=[{address_definition="0.0.0.0/0"}]destinations=[{address_definition="0.0.0.0/0"}]destination_ports=[{from_port=80to_port=80},{from_port=443to_port=443}]source_ports=[]tcp_flags=[]}}}]}}}},}
Create Suricata rules for Stateful Firewall Rule Groups
To create Suricata rules define the rules_string in the firewall_rule_groups variable using the EOT heredoc.
firewall_rule_groups={allow-domains={description="Allow specific domains using rules_string"capacity=300type="STATEFUL"rule_group={rules_source={rules_string=<<-EOT# Allow AWS domainspasstlsanyany->anyany(msg:"Allow amazonaws.com";tls.sni;content:"amazonaws.com";nocase;endswith;sid:100001;rev:1;)EOT}stateful_rule_options={rule_order="STRICT_ORDER"}}}}
Set Stateful Rule Options for Stateful Firewall Rule Groups
Set the rule_order argument in the stateful_rule_options variable to "STRICT_ORDER" to override the default. Strict ordering evaluates rule groups by order of priority starting from lowest number value. To be used with policies that also have STRICT_ORDER set for the the stateful engine.
firewall_rule_groups={allow-domains={description="Allow specific domains using rules_string"capacity=300type="STATEFUL"rule_group={rules_source={rules_string=<<-EOT# Allow AWS domainspasstlsanyany->anyany(msg:"Allow amazonaws.com";tls.sni;content:"amazonaws.com";nocase;endswith;sid:100001;rev:1;)EOT}stateful_rule_options={rule_order="STRICT_ORDER"}}}}