aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-12-02 23:04:47 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-12-02 23:04:47 +0900
commit124480c8af13a9cb82d64f9103c55ae64f36ceda (patch)
tree80e2cbceae0a4d86d30e5f59c1609c01074ac3a4 /contrib
parent2b146d5ec020636d48e23daf300589f41cc25839 (diff)
downloadgnunet-124480c8af13a9cb82d64f9103c55ae64f36ceda.tar.gz
gnunet-124480c8af13a9cb82d64f9103c55ae64f36ceda.zip
-we need ip forwarding on bridges
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/netjail/netjail_core.sh7
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