Fixed NAT/Masquerade for bridge

Packets from bridge to bridge shouldn't be masqueraded
This commit is contained in:
Sven Velt 2021-12-08 20:28:45 +01:00
parent 8bb252b35c
commit c366ef7dc0

View file

@ -4,6 +4,6 @@ iface br-lxc inet static
bridge_ports none
up /sbin/iptables -t nat -A POSTROUTING -s 192.168.1.0/24 ! -d 192.168.1.0/24 -j MASQUERADE
down /sbin/iptables -t nat -D POSTROUTING -s 192.168.1.0/24 ! -d 192.168.1.0/24 -j MASQUERADE
up /sbin/iptables -t nat -A POSTROUTING -s 192.168.1.0/24 ! -o br-lxc ! -d 192.168.1.0/24 -j MASQUERADE
down /sbin/iptables -t nat -D POSTROUTING -s 192.168.1.0/24 ! -o br-lxc ! -d 192.168.1.0/24 -j MASQUERADE