1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
##
# [Misc. Configuration]
##
#
PATH=/sbin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:$PATH ; export PATH
VER="9.7"
APPN="apf"
ifconfig=/sbin/ifconfig
ip=/sbin/ip
IPT="/sbin/iptables"
MPB="/sbin/modprobe"
LSM="/sbin/lsmod"
RMM="/sbin/rmmod"
IPTS="/sbin/iptables-save"
IPTR="/sbin/iptables-restore"
DIFF="/usr/bin/diff"
WGET="/usr/bin/wget"
MD5="/usr/bin/md5sum"
UNAME="/bin/uname"
IF="$IFACE_IN"
IN_IF="$IFACE_IN"
OUT_IF="$IFACE_OUT"
ALL_STOP="DROP"
LSTOP="LD"
LACCEPT="LA"
TOS_DEF_TOS="$TOS_DEF"
NET=`$ifconfig $IF | grep -vw inet6 | grep -w inet | cut -d : -f 2 | cut -d \ -f 1`
NAME=`echo $APPN | tr '[:lower:]' '[:upper:]'`
TIME=`date +"%D %H:%M:%S"`
UTIME=`date +"%s"`
KREL=`$UNAME -r | cut -d\. -f 1,2`
LOCK_TIMEOUT="360"
LOCK="$INSPATH/lock.utime"
ADR="$INSTALL_PATH/ad/ad.rules"
ALLOW_HOSTS="$INSTALL_PATH/allow_hosts.rules"
DENY_HOSTS="$INSTALL_PATH/deny_hosts.rules"
GALLOW_HOSTS="$INSTALL_PATH/glob_allow.rules"
GDENY_HOSTS="$INSTALL_PATH/glob_deny.rules"
DS_HOSTS="$INSTALL_PATH/ds_hosts.rules"
PHP_HOSTS="$INSTALL_PATH/php_hosts.rules"
DROP_HOSTS="$INSTALL_PATH/sdrop_hosts.rules"
ECNSHAME_HOSTS="$INSTALL_PATH/ecnshame_hosts.rules"
RABP="$INSTALL_PATH/internals/rab.ports"
MD5_FILES="$ADR $INSTALL_PATH/*.rules $INSTALL_PATH/internals/*.networks $INSTALL_PATH/vnet/*.rules $RABP"
MCATNET="$INSTALL_PATH/internals/multicast.networks"
PRVNET="$INSTALL_PATH/internals/private.networks"
RESNET="$INSTALL_PATH/internals/reserved.networks"
PRERT="$INSTALL_PATH/preroute.rules"
POSTRT="$INSTALL_PATH/postroute.rules"
DSTOP=$ALL_STOP
if [ "$LOG_EXT" == "1" ]; then
LEXT="--log-tcp-options --log-ip-options"
else
LEXT=""
fi
. $RABP
CNF_FUNC="$INSTALL_PATH/internals/functions.apf"
. $CNF_FUNC
|