diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-02 23:04:47 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-02 23:04:47 +0900 |
commit | 124480c8af13a9cb82d64f9103c55ae64f36ceda (patch) | |
tree | 80e2cbceae0a4d86d30e5f59c1609c01074ac3a4 /contrib | |
parent | 2b146d5ec020636d48e23daf300589f41cc25839 (diff) | |
download | gnunet-124480c8af13a9cb82d64f9103c55ae64f36ceda.tar.gz gnunet-124480c8af13a9cb82d64f9103c55ae64f36ceda.zip |
-we need ip forwarding on bridges
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/netjail/netjail_core.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/netjail/netjail_core.sh b/contrib/netjail/netjail_core.sh index da784fa5e..5e4fb39f1 100755 --- a/contrib/netjail/netjail_core.sh +++ b/contrib/netjail/netjail_core.sh | |||
@@ -188,9 +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 nft add table nat | 191 | ip netns exec $NODE sysctl -w net.ipv4.ip_forward=1 |
192 | ip netns exec $NODE nft add chain nat postrouting { type nat hook postrouting priority 0 \; } | 192 | ip netns exec $NODE nft add table nat |
193 | ip netns exec $NODE nft add rule ip nat postrouting ip saddr "$ADDRESS/$MASK" counter masquerade | 193 | ip netns exec $NODE nft add chain nat postrouting { type nat hook postrouting priority 0 \; } |
194 | 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 | 195 | # ip netns exec $NODE iptables -t nat -A POSTROUTING -s "$ADDRESS/$MASK" -j MASQUERADE |
195 | } | 196 | } |
196 | 197 | ||