# AUTO GENERATED, DO NOT EDIT.
#
# OPNsense.rules
# User defined rules
#

# -- User defined rules
{% if helpers.exists('OPNsense.IDS.userDefinedRules.rule') %}
{%      for rule in helpers.toList('OPNsense.IDS.userDefinedRules.rule') %}
{%          if rule.enabled|default('0') == '1' %}
{{rule.action}}{% if rule.fingerprint|default('') != ""
      %} tls {% else %} ip {% endif %} any any -> any any (msg:"{{rule.description.replace('"','\"')}}"; {%
      if rule.fingerprint|default('') != "" %} tls.fingerprint:"{{rule.fingerprint.lower()}}";{% endif
      %}{%
      if rule.geoip|default('') != ""%} geoip:{% if rule.geoip_direction|default('') != '' %}{{rule.geoip_direction}},{% endif %}{{rule.geoip}} ;{% endif
      %} sid:{{
      4294967295 - loop.index
      }}; rev:1;)
{%          endif %}
{%      endfor %}
{% endif %}