mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
(ids/ips) use macro physical_interface
This commit is contained in:
parent
285c4c62cb
commit
0aec40f7a4
@ -1,3 +1,5 @@
|
||||
{# 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 #}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
{# 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 %}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user