Developing lightweight computation at the DSG edge

Commit 4b2833b7 authored by p4u's avatar p4u
Browse files

Added masquerade rule when runing as gateway. Changed default MTU to 1360...

Added masquerade rule when runing as gateway. Changed default MTU to 1360 (with 1400 sometimes there are problems)
parent 4cef6d54
diff --git a/etc/gwck/gwck_conf_qmp_ipv4 b/etc/gwck/gwck_conf_qmp_ipv4
index ed28194..ac79dc4 100644
--- a/etc/gwck/gwck_conf_qmp_ipv4
+++ b/etc/gwck/gwck_conf_qmp_ipv4
@@ -137,6 +137,9 @@ done
iface="$(ip route | grep "^default" | grep -v "bmx6_out" | sed -n -e 's/.* dev \([^ ]\+\) .*/\1/gp')"
if [ -n "$iface" ] && ! echo "$iface" | grep -q " "
then
+ log "Masquerading via iptables"
+ iptables -A POSTROUTING -t nat -o $iface -j MASQUERADE
+
log "Clamping the MSS via iptables"
iptables -I FORWARD -o $iface -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
fi
diff --git a/etc/gwck/module/bmx6 b/etc/gwck/module/bmx6
index 26a31ee..7a504f2 100644
--- a/etc/gwck/module/bmx6
+++ b/etc/gwck/module/bmx6
@@ -61,7 +61,7 @@ fi
# bmx6 tunOut mtu value.
[ -z "$GWCK_MOD_BMX6_MTU" ] \
-&& GWCK_MOD_BMX6_MTU="1400"
+&& GWCK_MOD_BMX6_MTU="1360"
# Not disable offer if no other nodes offer Internet access.
[ -z "$GWCK_MOD_BMX6_TEST_OTHER_OFFER" ] \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment