projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
novi upstream verzije 2.8.3
[ossec-hids.git]
/
active-response
/
firewall-drop.sh
diff --git
a/active-response/firewall-drop.sh
b/active-response/firewall-drop.sh
index
f0e634b
..
820d759
100755
(executable)
--- a/
active-response/firewall-drop.sh
+++ b/
active-response/firewall-drop.sh
@@
-29,16
+29,16
@@
RULEID=""
ACTION=$1
USER=$2
IP=$3
ACTION=$1
USER=$2
IP=$3
+PWD=`pwd`
+LOCK="${PWD}/fw-drop"
+LOCK_PID="${PWD}/fw-drop/pid"
LOCAL=`dirname $0`;
cd $LOCAL
cd ../
LOCAL=`dirname $0`;
cd $LOCAL
cd ../
-PWD=`pwd`
filename=$(basename "$0")
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}
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
COUNT=0;
lock;
while [ 1 ]; do
- echo ".."
${IPTABLES} ${ARG1}
RES=$?
if [ $RES = 0 ]; then
${IPTABLES} ${ARG1}
RES=$?
if [ $RES = 0 ]; then
@@
-177,6
+176,7
@@
if [ "X${UNAME}" = "XLinux" ]; then
fi
done
fi
done
+ COUNT=0;
while [ 1 ]; do
${IPTABLES} ${ARG2}
RES=$?
while [ 1 ]; do
${IPTABLES} ${ARG2}
RES=$?