From e0d40af2a14771a3ef6668aab3a9f080ea9ac9bf Mon Sep 17 00:00:00 2001 From: pvincent Date: Wed, 10 Apr 2024 21:18:40 +0400 Subject: [PATCH] jinja template no format on save --- templates/nftables/lxd.table.j2 | 56 ++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/templates/nftables/lxd.table.j2 b/templates/nftables/lxd.table.j2 index 3f48203..634aed5 100644 --- a/templates/nftables/lxd.table.j2 +++ b/templates/nftables/lxd.table.j2 @@ -1,35 +1,35 @@ table inet lxd { -chain pstrt.lxdbr0 { -type nat hook postrouting priority srcnat; policy accept; + chain pstrt.lxdbr0 { + type nat hook postrouting priority srcnat; policy accept; -{%- if target != 'prod' %} -# BLOCK SMTP PORTS -tcp dport { 25, 465, 587 } ip saddr {{ firewall.bridge_subnet }} {%- if firewall.container_mail_passthrough %} ip saddr -!= {{ env.ip_mail_passthrough }} {% endif %} log prefix "Drop SMTP away from container: " drop -{% endif -%} + {%- if target != 'prod' %} + # BLOCK SMTP PORTS + tcp dport { 25, 465, 587 } ip saddr {{ firewall.bridge_subnet }} {%- if firewall.container_mail_passthrough %} ip saddr + != {{ env.ip_mail_passthrough }} {% endif %} log prefix "Drop SMTP away from container: " drop + {% endif -%} -ip saddr {{ firewall.bridge_subnet }} ip daddr != {{ firewall.bridge_subnet }} masquerade -} + ip saddr {{ firewall.bridge_subnet }} ip daddr != {{ firewall.bridge_subnet }} masquerade + } -chain fwd.lxdbr0 { -type filter hook forward priority filter; policy accept; -ip version 4 oifname "lxdbr0" accept -ip version 4 iifname "lxdbr0" accept -} + chain fwd.lxdbr0 { + type filter hook forward priority filter; policy accept; + ip version 4 oifname "lxdbr0" accept + ip version 4 iifname "lxdbr0" accept + } -chain in.lxdbr0 { -type filter hook input priority filter; policy accept; -iifname "lxdbr0" tcp dport 53 accept -iifname "lxdbr0" udp dport 53 accept -iifname "lxdbr0" icmp type { destination-unreachable, time-exceeded, parameter-problem } accept -iifname "lxdbr0" udp dport 67 accept -} + chain in.lxdbr0 { + type filter hook input priority filter; policy accept; + iifname "lxdbr0" tcp dport 53 accept + iifname "lxdbr0" udp dport 53 accept + iifname "lxdbr0" icmp type { destination-unreachable, time-exceeded, parameter-problem } accept + iifname "lxdbr0" udp dport 67 accept + } -chain out.lxdbr0 { -type filter hook output priority filter; policy accept; -oifname "lxdbr0" tcp sport 53 accept -oifname "lxdbr0" udp sport 53 accept -oifname "lxdbr0" icmp type { destination-unreachable, time-exceeded, parameter-problem } accept -oifname "lxdbr0" udp sport 67 accept + chain out.lxdbr0 { + type filter hook output priority filter; policy accept; + oifname "lxdbr0" tcp sport 53 accept + oifname "lxdbr0" udp sport 53 accept + oifname "lxdbr0" icmp type { destination-unreachable, time-exceeded, parameter-problem } accept + oifname "lxdbr0" udp sport 67 accept + } } -} \ No newline at end of file