Commit 0aec40f7 authored by Ad Schellevis's avatar Ad Schellevis

(ids/ips) use macro physical_interface

parent 285c4c62
{# Macro import #}
{% from 'OPNsense/Macros/interface.macro' import physical_interface %}
{% if helpers.exists('OPNsense.IDS.general') and OPNsense.IDS.general.enabled|default("0") == "1" %}
suricata_enable="YES"
......@@ -12,10 +14,10 @@ suricata_netmap=YES
{% for intfName in OPNsense.IDS.general.interfaces.split(',') %}
{% if loop.index == 1 %}
{# enable first interface #}
suricata_interface="{{helpers.getNodeByTag('interfaces.'+intfName).if}}"
suricata_interface="{{ physical_interface(intfName) }}"
{% else %}
{# store additional interfaces to addFlags #}
{% do addFlags.append(helpers.getNodeByTag('interfaces.'+intfName).if) %}
{% do addFlags.append(physical_interface(intfName)) %}
{% endif %}
{% endfor %}
{# append additional interfaces #}
......
{# Macro import #}
{% from 'OPNsense/Macros/interface.macro' import physical_interface %}
%YAML 1.1
---
......@@ -317,11 +319,11 @@ netmap:
{% if helpers.exists('OPNsense.IDS.general.interfaces') %}
{% for intfName in OPNsense.IDS.general.interfaces.split(',') %}
- interface: {{helpers.getNodeByTag('interfaces.'+intfName).if}}
copy-iface: {{helpers.getNodeByTag('interfaces.'+intfName).if}}+
- interface: {{physical_interface(intfName)}}
copy-iface: {{physical_interface(intfName)}}+
- interface: {{helpers.getNodeByTag('interfaces.'+intfName).if}}+
copy-iface: {{helpers.getNodeByTag('interfaces.'+intfName).if}}
- interface: {{physical_interface(intfName)}}+
copy-iface: {{physical_interface(intfName)}}
{% endfor %}
{% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment