X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=active-response%2Ffirewall-drop.sh;fp=active-response%2Ffirewall-drop.sh;h=820d759e313b8bb2a8827fa10b81db1b388fc38e;hp=f0e634bb94107a79bdb9d78bf52eb13fc846fbc3;hb=789cbc8e52da68eba3517b920ef22e000cf3c9fd;hpb=ef70704f0b31b59bb719b884d6a99cb9e3e2044a diff --git a/active-response/firewall-drop.sh b/active-response/firewall-drop.sh index f0e634b..820d759 100755 --- a/active-response/firewall-drop.sh +++ b/active-response/firewall-drop.sh @@ -29,16 +29,16 @@ RULEID="" ACTION=$1 USER=$2 IP=$3 +PWD=`pwd` +LOCK="${PWD}/fw-drop" +LOCK_PID="${PWD}/fw-drop/pid" LOCAL=`dirname $0`; cd $LOCAL cd ../ -PWD=`pwd` filename=$(basename "$0") -LOCK="${PWD}/fw-drop" -LOCK_PID="${LOCK}/pid" LOG_FILE="${PWD}/../logs/active-responses.log" echo "`date` $0 $1 $2 $3 $4 $5" >> ${LOG_FILE} @@ -161,7 +161,6 @@ if [ "X${UNAME}" = "XLinux" ]; then COUNT=0; lock; while [ 1 ]; do - echo ".." ${IPTABLES} ${ARG1} RES=$? if [ $RES = 0 ]; then @@ -177,6 +176,7 @@ if [ "X${UNAME}" = "XLinux" ]; then fi done + COUNT=0; while [ 1 ]; do ${IPTABLES} ${ARG2} RES=$?