summaryrefslogtreecommitdiff
path: root/data/templates/firewall/nftables.j2
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-09-08 17:36:17 +0200
committerGitHub <noreply@github.com>2023-09-08 17:36:17 +0200
commita12559a728310f0e3bf6dc18f7bd2a0ba444b890 (patch)
tree88d443e9961763c5ee0f922e9f68433d24f76e1e /data/templates/firewall/nftables.j2
parent28ccebeac2ee4390d7c109a8a2da6b24769ab113 (diff)
parent1772c0a7232789e6eeb0caa78fe630fab899522d (diff)
downloadvyos-1x-a12559a728310f0e3bf6dc18f7bd2a0ba444b890.tar.gz
vyos-1x-a12559a728310f0e3bf6dc18f7bd2a0ba444b890.zip
Merge pull request #2222 from nicolas-fort/T4072-fwall-bridge
T4072: add firewall bridge filtering.
Diffstat (limited to 'data/templates/firewall/nftables.j2')
-rw-r--r--data/templates/firewall/nftables.j218
1 files changed, 15 insertions, 3 deletions
diff --git a/data/templates/firewall/nftables.j2 b/data/templates/firewall/nftables.j2
index a82a5537b..87630940b 100644
--- a/data/templates/firewall/nftables.j2
+++ b/data/templates/firewall/nftables.j2
@@ -1,6 +1,7 @@
#!/usr/sbin/nft -f
{% import 'firewall/nftables-defines.j2' as group_tmpl %}
+{% import 'firewall/nftables-bridge.j2' as bridge_tmpl %}
flush chain raw FW_CONNTRACK
flush chain ip6 raw FW_CONNTRACK
@@ -154,7 +155,7 @@ table ip vyos_filter {
{% endfor %}
{% endif %}
{% endif %}
-{{ group_tmpl.groups(group, False) }}
+{{ group_tmpl.groups(group, False, True) }}
}
{% if first_install is not vyos_defined %}
@@ -257,5 +258,16 @@ table ip6 vyos_filter {
{% endfor %}
{% endif %}
{% endif %}
-{{ group_tmpl.groups(group, True) }}
-} \ No newline at end of file
+{{ group_tmpl.groups(group, True, True) }}
+}
+
+## Bridge Firewall
+{% if first_install is not vyos_defined %}
+delete table bridge vyos_filter
+{% endif %}
+{% if bridge is vyos_defined %}
+table bridge vyos_filter {
+{{ bridge_tmpl.bridge(bridge) }}
+{{ group_tmpl.groups(group, False, False) }}
+}
+{% endif %}