summaryrefslogtreecommitdiff
path: root/data/templates/firewall/nftables-defines.tmpl
blob: 3578a9dc558a01243cab18bf6bf71bb842514ca1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{% if group is defined %}
{%   if group.address_group is defined %}
{%     for group_name, group_conf in group.address_group.items() %}
define A_{{ group_name }} = { {{ group_conf.address | join(",") }} }
{%     endfor %}
{%   endif %}
{%   if group.ipv6_address_group is defined %}
{%     for group_name, group_conf in group.ipv6_address_group.items() %}
define A6_{{ group_name }} = { {{ group_conf.address | join(",") }} }
{%     endfor %}
{%   endif %}
{%   if group.network_group is defined %}
{%     for group_name, group_conf in group.network_group.items() %}
define N_{{ group_name }} = { {{ group_conf.network | join(",") }} }
{%     endfor %}
{%   endif %}
{%   if group.ipv6_network_group is defined %}
{%     for group_name, group_conf in group.ipv6_network_group.items() %}
define N6_{{ group_name }} = { {{ group_conf.network | join(",") }} }
{%     endfor %}
{%   endif %}
{%   if group.port_group is defined %}
{%     for group_name, group_conf in group.port_group.items() %}
define P_{{ group_name }} = { {{ group_conf.port | join(",") }} }
{%     endfor %}
{%   endif %}
{% endif %}