diff options
Diffstat (limited to 'contrib/netjail/netjail_core.sh')
-rwxr-xr-x | contrib/netjail/netjail_core.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/netjail/netjail_core.sh b/contrib/netjail/netjail_core.sh index ed363cf35..da784fa5e 100755 --- a/contrib/netjail/netjail_core.sh +++ b/contrib/netjail/netjail_core.sh | |||
@@ -188,7 +188,10 @@ netjail_node_add_nat() { | |||
188 | local ADDRESS=$2 | 188 | local ADDRESS=$2 |
189 | local MASK=$3 | 189 | local MASK=$3 |
190 | 190 | ||
191 | ip netns exec $NODE iptables -t nat -A POSTROUTING -s "$ADDRESS/$MASK" -j MASQUERADE | 191 | ip netns exec $NODE nft add table nat |
192 | ip netns exec $NODE nft add chain nat postrouting { type nat hook postrouting priority 0 \; } | ||
193 | ip netns exec $NODE nft add rule ip nat postrouting ip saddr "$ADDRESS/$MASK" counter masquerade | ||
194 | # ip netns exec $NODE iptables -t nat -A POSTROUTING -s "$ADDRESS/$MASK" -j MASQUERADE | ||
192 | } | 195 | } |
193 | 196 | ||
194 | netjail_node_add_default() { | 197 | netjail_node_add_default() { |