diff --git a/modules/rhizo_base/files/var/SysmoBTS/chk_masq b/modules/rhizo_base/files/var/SysmoBTS/chk_masq new file mode 100644 index 0000000..303e49a --- /dev/null +++ b/modules/rhizo_base/files/var/SysmoBTS/chk_masq @@ -0,0 +1,9 @@ +#!/bin/bash + +. /home/rhizomatica/bin/vars.sh + +/sbin/iptables -t nat -vnL | egrep "MASQUERADE.*all.*$_PUBIF.*172.16.0.0/16.*0.0.0.0/0" +if [ $? != 0 ] ; then + # Add the Masquerade RULE + iptables -t nat -I POSTROUTING -s 172.16.0.0/16 -o $_PUBIF -j MASQUERADE +fi