summaryrefslogtreecommitdiff
path: root/data/templates/firewall/nftables-policy.j2
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-06-15 20:03:47 +0200
committerGitHub <noreply@github.com>2022-06-15 20:03:47 +0200
commiteab40258869631b38b4787816c84efb14fc75ad3 (patch)
tree1ba9e60f390495ccab46e00934d5c78f2e52865d /data/templates/firewall/nftables-policy.j2
parent609a3abb3d9b60daf0bdd5e3733791d520322802 (diff)
parent7e59b2a3f31edd4793264876d87af725771a222d (diff)
downloadvyos-1x-eab40258869631b38b4787816c84efb14fc75ad3.tar.gz
vyos-1x-eab40258869631b38b4787816c84efb14fc75ad3.zip
Merge pull request #1361 from sarthurdev/firewall_named
firewall: T4147: Use named sets for firewall groups
Diffstat (limited to 'data/templates/firewall/nftables-policy.j2')
-rw-r--r--data/templates/firewall/nftables-policy.j27
1 files changed, 5 insertions, 2 deletions
diff --git a/data/templates/firewall/nftables-policy.j2 b/data/templates/firewall/nftables-policy.j2
index 0154c9f7e..281525407 100644
--- a/data/templates/firewall/nftables-policy.j2
+++ b/data/templates/firewall/nftables-policy.j2
@@ -1,13 +1,13 @@
#!/usr/sbin/nft -f
+{% import 'firewall/nftables-defines.j2' as group_tmpl %}
+
{% if cleanup_commands is vyos_defined %}
{% for command in cleanup_commands %}
{{ command }}
{% endfor %}
{% endif %}
-include "/run/nftables_defines.conf"
-
table ip mangle {
{% if first_install is vyos_defined %}
chain VYOS_PBR_PREROUTING {
@@ -29,6 +29,8 @@ table ip mangle {
}
{% endfor %}
{% endif %}
+
+{{ group_tmpl.groups(firewall_group, False) }}
}
table ip6 mangle {
@@ -52,4 +54,5 @@ table ip6 mangle {
}
{% endfor %}
{% endif %}
+{{ group_tmpl.groups(firewall_group, True) }}
}