chk_masq scrpit: iptables needs full path run from cron

This commit is contained in:
Keith Whyte 2021-12-04 08:06:57 +01:00
parent 7a55de632c
commit 8722e706c0

View file

@ -5,5 +5,5 @@
/sbin/iptables -t nat -vnL | egrep "MASQUERADE.*all.*$_PUB_IF.*172.16.0.0/16.*0.0.0.0/0" /sbin/iptables -t nat -vnL | egrep "MASQUERADE.*all.*$_PUB_IF.*172.16.0.0/16.*0.0.0.0/0"
if [ $? != 0 ] ; then if [ $? != 0 ] ; then
# Add the Masquerade RULE # Add the Masquerade RULE
iptables -t nat -I POSTROUTING -s 172.16.0.0/16 -o $_PUB_IF -j MASQUERADE /sbin/iptables -t nat -I POSTROUTING -s 172.16.0.0/16 -o $_PUB_IF -j MASQUERADE
fi fi