From: Ian Kelling Date: Tue, 10 Nov 2020 20:00:00 +0000 (-0500) Subject: fix: multiple nns could cause removal of nat iptables rule X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=f57d11a6635aa26b32085db9aa53d8baedb47944;p=newns fix: multiple nns could cause removal of nat iptables rule --- diff --git a/newns b/newns index a3a9325..894ac31 100755 --- a/newns +++ b/newns @@ -192,7 +192,7 @@ fi nat() { for if in ${gateway_ifs[@]}; do - dexec iptables -t nat $1 POSTROUTING -o $if -j MASQUERADE \ + dexec iptables -t nat $1 POSTROUTING -s $network.0/24 -o $if -j MASQUERADE \ -m comment --comment "systemd network namespace nat" done }