Script to check local MASQ
This is for BTS access to d/l updates
This commit is contained in:
parent
5238b5a847
commit
2e4f552ab7
1 changed files with 9 additions and 0 deletions
9
modules/rhizo_base/files/var/SysmoBTS/chk_masq
Normal file
9
modules/rhizo_base/files/var/SysmoBTS/chk_masq
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue