Commit f235388c authored by Vitaly Lipatov's avatar Vitaly Lipatov

use config for check_netstat

parent be5b940c
......@@ -2,25 +2,18 @@
cd $(dirname $0)
# uncomment one of
MAXPERC=10
#MAXNUM=4
# инималное колиево дл наала повеки
MINTOTAL=700
. config
. ./config
get_already_dropped()
{
/sbin/iptables -L -n | grep DROP | awk '{print $4;}' > ipt.dropped.list
/sbin/iptables -L -n | grep DROP | grep -v "0.0.0.0" | awk '{print $4;}' > ipt.dropped.list
}
do_drop()
{
grep -q "$1" ipt.dropped.list white.list && return 1
echo "$1 # $3 from $4 ($2 percent), $(date) by $0" >> dropped.list
/sbin/iptables -A INPUT -s $1 -j DROP
#/sbin/iptables -A INPUT -s $1 -j DROP
}
get_already_dropped
......
#!/bin/sh
cd $(dirname $0)
# uncomment one of
MAXPERC=10
#MAXNUM=4
# инималное колиево дл наала повеки
MINTOTAL=700
OURIP1="87.249.47.44"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment