Commit f6c328f1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

update scripts

parent 7233fa30
#!/bin/sh #!/bin/sh
iptables -D INPUT -s $1 -j DROP IP=$1
if echo $IP | grep -q "[a-Z]" ; then
IP=$(resolve -s $IP)
fi
iptables -D INPUT -s $IP -j DROP
...@@ -9,7 +9,7 @@ MAXPERC=10 ...@@ -9,7 +9,7 @@ MAXPERC=10
# инималное колиево дл наала повеки # инималное колиево дл наала повеки
MINTOTAL=700 MINTOTAL=700
OURIP1="87.249.47.44" . config
get_already_dropped() get_already_dropped()
{ {
......
...@@ -4,11 +4,11 @@ cd $(dirname $0) ...@@ -4,11 +4,11 @@ cd $(dirname $0)
# uncomment one of # uncomment one of
#MAXPERC=40 #MAXPERC=40
MAXNUM=40 MAXNUM=90
MAXLIST=30 MAXLIST=30
OURIP1="212.176.200.22" . config
get_already_dropped() get_already_dropped()
{ {
...@@ -44,8 +44,8 @@ get_already_dropped ...@@ -44,8 +44,8 @@ get_already_dropped
#tail -n 1000 /var/log/nginx/*access.log | awk '{print $1;}' | \ #tail -n 1000 /var/log/nginx/*access.log | awk '{print $1;}' | \
# grep -v "127.0.0.1" | grep -v "0.0.0.0" | grep -v "$OURIP1" | sort > full.list # grep -v "127.0.0.1" | grep -v "0.0.0.0" | grep -v "$OURIP1" | sort > full.list
timeout 10 tail -f -n 300 /var/log/nginx/azbyka.ru-error.log | sed -e "s|.*client: \([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*|\1|g" | \ timeout 10 tail -f -n 300 /var/log/nginx/*-error.log | sed -e "s|.*client: \([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*|\1|g" | \
grep -v "127.0.0.1" | grep -v "0.0.0.0" | grep -v "$OURIP1" | head -n 1000 | sort > full.list grep -v "127.0.0.1" | grep -v "0.0.0.0" | grep -v "$OURIP1" | sort > full.list
NUMP=$(cat full.list | wc -l) NUMP=$(cat full.list | wc -l)
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
cd $(dirname $0) cd $(dirname $0)
# uncomment one of # uncomment one of
MAXPERC=40 #MAXPERC=40
#MAXNUM=100 MAXNUM=60
MAXLIST=30 MAXLIST=30
OURIP1="212.176.200.22" . config
get_already_dropped() get_already_dropped()
{ {
...@@ -31,7 +31,8 @@ echo "Tail *access.log..." ...@@ -31,7 +31,8 @@ echo "Tail *access.log..."
# grep -v "127.0.0.1" | grep -v "0.0.0.0" | grep -v "$OURIP1" | sort > full.list # grep -v "127.0.0.1" | grep -v "0.0.0.0" | grep -v "$OURIP1" | sort > full.list
timeout 3 tail -f -n 200 /var/log/nginx/*access.log | awk '{print $1;}' | \ timeout 3 tail -f -n 200 /var/log/nginx/*access.log | awk '{print $1;}' | \
grep -v "127.0.0.1" | grep -v "0.0.0.0" | grep -v "$OURIP1" | head -n 1000 | sort > full.list #timeout 3 cat /var/log/nginx/access-admin.log | awk '{print $1;}' | \
grep -v "127.0.0.1" | grep -v "0.0.0.0" | grep -v "$OURIP1" | sort > full.list
NUMP=$(cat full.list | wc -l) NUMP=$(cat full.list | wc -l)
NUMPUNIQ=$(cat full.list | sort -u | wc -l) NUMPUNIQ=$(cat full.list | sort -u | wc -l)
......
# yandex # yandex
93.158.149.31 93.158.149.31
# mtmon3
5.255.210.93
# opera # opera
80.239.242.142 80.239.242.142
# opera-mini.net
217.212.231.*
# mts # mts
213.87.133.223 213.87.133.223
# msn # msn
157.56.93.209 157.56.93.209
# seni.etersoft.ru
91.232.225.2
91.232.225.6
91.232.225.46
91.232.225.201
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