set up masquerading as part of 'weave launch'

thus simplifying external access
This commit is contained in:
Matthias Radestock committed 2014-08-30 14:25:00 +01:00
1 parent 038d5c4f80
commit b9be18c386
2 files changed
+11 -10

No files matched your search

+9
View File
@@ -39,9 +39,18 @@ create_bridge() {
ip link set dev $BRIDGE up
}
setup_masquerading() {
IPTABLES_ARGS="POSTROUTING -d $IPADDR ! -s $IPADDR -j MASQUERADE"
if ! iptables -w -t nat -C $IPTABLES_ARGS >/dev/null 2>&1
then
iptables -w -t nat -A $IPTABLES_ARGS >/dev/null
fi
}
case "$COMMAND" in
launch)
create_bridge
setup_masquerading
# We set the router name to the bridge mac since that is
# stable across re-creations of the containers.
#