puppet/modules/rhizo_base/files/var/SysmoBTS/chk_masq
Keith Whyte 2e4f552ab7 Script to check local MASQ
This is for BTS access to d/l updates
2020-04-29 05:11:37 +02:00

9 lines
260 B
Bash

#!/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