Fix comparison for masq

Change-Id: I31ed79f4b74cc08077397d6fea0f474cdcb3ba18
This commit is contained in:
Alex Ruiz Estradera 2016-11-02 16:18:06 +01:00
parent 9bfd48a711
commit 0495f369a6

View File

@ -85,7 +85,7 @@ fi
#port ${PORT_ID} interface veth1
# Add masquerading to enable NATing
if [ "${MASQUERADE_ON} = 'on' " ] && [ -z "$(iptables -v -n -L -t nat | grep "MASQUERADE" | grep "${FIP}" | grep "${NIC}")" ]; then
if [ "${MASQUERADE_ON}" == 'on' ] && [ -z "$(iptables -v -n -L -t nat | grep "MASQUERADE" | grep "${FIP}" | grep "${NIC}")" ]; then
iptables -t nat -I POSTROUTING -o ${NIC} -s ${FIP} -j MASQUERADE
iptables -I FORWARD -s ${FIP} -j ACCEPT
echo "Succesfully enabled masquerading"