Script to check local MASQ

This is for BTS access to d/l updates
This commit is contained in:
Keith Whyte 2020-04-29 05:11:37 +02:00
parent 5238b5a847
commit 2e4f552ab7

View file

@ -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