Merge "Derive the public interface"

This commit is contained in:
Jenkins authored and Gerrit Code Review committed 2015-07-21 14:23:53 +00:00
commit fe0c382bfa
1 file changed
+3 -1
+3 -1
View File
@@ -147,7 +147,9 @@ access the internet through PUBLIC_INTERFACE::
cat > /opt/stack/devstack/local.sh << END_LOCAL_SH
#!/bin/sh
sudo iptables -t nat -A POSTROUTING -o br-ex -j MASQUERADE
ROUTE_TO_INTERNET=$(ip route get 8.8.8.8)
OBOUND_DEV=$(echo ${ROUTE_TO_INTERNET#*dev} | awk '{print $1}')
sudo iptables -t nat -A POSTROUTING -o $OBOUND_DEV -j MASQUERADE
END_LOCAL_SH
chmod 755 /opt/stack/devstack/local.sh