{% if helpers.exists('OPNsense.IDS.rules.fingerprint') %}
{% if helpers.exists('OPNsense.IDS.userDefinedRules.rule') %}
{% for rule in helpers.toList('OPNsense.IDS.rules.fingerprint') %}
{% for rule in helpers.toList('OPNsense.IDS.userDefinedRules.rule') %}
{% if rule.enabled|default('0') == '1' %}
{% if rule.enabled|default('0') == '1' %}
{{rule.action}} tls any any -> any any (msg:"{{rule.description.replace('"','\"')}}"; tls.fingerprint:"{{rule.fingerprint.lower()}}"; sid:{{4294967295 - loop.index}}; rev:1;)
{{rule.action}} tls 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