]> xn--ix-yja.es Git - alex.git/commitdiff
Align, try to fix rules accumulating
authoralex <alex@pdp7.net>
Tue, 7 Oct 2025 18:10:33 +0000 (20:10 +0200)
committeralexpdp7 <alex@corcoles.net>
Tue, 7 Oct 2025 18:11:24 +0000 (20:11 +0200)
personal_infra/puppet/modules/proxmox/templates/interfaces.epp

index ccfe1b211b4b0d02198797856e120aabe5b053b5..809c7dc4cc73f8246e2c0b4b959753dbf1ae5a61 100644 (file)
@@ -14,6 +14,7 @@ iface vmbr0 inet static
        bridge_ports none
        bridge_stp off
        bridge_fd 0
-       post-up echo 1 > /proc/sys/net/ipv4/ip_forward
-       post-up iptables -t nat -A POSTROUTING -s '<%= $network['proxmox']['network'] %>' -o eno1 -j MASQUERADE
+       post-up   echo 1 > /proc/sys/net/ipv4/ip_forward
+       post-up   iptables -t nat -A POSTROUTING -s '<%= $network['proxmox']['network'] %>' -o eno1 -j MASQUERADE
+       post-down iptables -t nat -D POSTROUTING -s '<%= $network['proxmox']['network'] %>' -o eno1 -j MASQUERADE
 <%= $network['proxmox']['extra_interfaces_content'] %>