summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-02-01 21:21:54 +0100
committerGitHub <noreply@github.com>2024-02-01 21:21:54 +0100
commit8a4017d91d5022cfca294a0873e937c39899c094 (patch)
tree34048129f97640eaf36615f658fa4a975101ffec /data/templates
parent176a79420c5bf676b0f857a169a9b9c3906ee0c0 (diff)
parent6ce5fedb602c5ea0df52049a5e9c4fb4f5a86122 (diff)
downloadvyos-1x-8a4017d91d5022cfca294a0873e937c39899c094.tar.gz
vyos-1x-8a4017d91d5022cfca294a0873e937c39899c094.zip
Merge pull request #2756 from nicolas-fort/T4839
T4839: firewall: Add dynamic address group in firewall configuration
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/firewall/nftables-defines.j221
1 files changed, 21 insertions, 0 deletions
diff --git a/data/templates/firewall/nftables-defines.j2 b/data/templates/firewall/nftables-defines.j2
index a20c399ae..8a75ab2d6 100644
--- a/data/templates/firewall/nftables-defines.j2
+++ b/data/templates/firewall/nftables-defines.j2
@@ -98,5 +98,26 @@
}
{% endfor %}
{% endif %}
+
+{% if group.dynamic_group is vyos_defined %}
+{% if group.dynamic_group.address_group is vyos_defined and not is_ipv6 and is_l3 %}
+{% for group_name, group_conf in group.dynamic_group.address_group.items() %}
+ set DA_{{ group_name }} {
+ type {{ ip_type }}
+ flags dynamic, timeout
+ }
+{% endfor %}
+{% endif %}
+
+{% if group.dynamic_group.ipv6_address_group is vyos_defined and is_ipv6 and is_l3 %}
+{% for group_name, group_conf in group.dynamic_group.ipv6_address_group.items() %}
+ set DA6_{{ group_name }} {
+ type {{ ip_type }}
+ flags dynamic, timeout
+ }
+{% endfor %}
+{% endif %}
+{% endif %}
+
{% endif %}
{% endmacro %}