ddos

01/01/2015 14:45 morion77#1
Hi I'm using this script to block ddos, the system has mistakenly locked the address of my web server, I am trying to remove the block but I can not. Do you have any idea how to do?
Thank You

Code:
#!/bin/sh
FR_MIN_CONN=400
TMP_PREFIX='/tmp/frrr/'
TMP_FILE=`mktemp $TMP_PREFIX.XXXXXXXX` 
/usr/bin/netstat -unp tcp -f inet| awk '{if(NR>2 && NF=6) print $5}' | cut -d. -f1-4 | grep '^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$' | sort | uniq -c | sort -nr > $TMP_FILE
while read line; do
 CURR_LINE_CONN=$(echo $line | cut -d" " -f1)
 CURR_LINE_IP=$(echo $line | cut -d" " -f2)
 if [ $CURR_LINE_CONN -lt $FR_MIN_CONN ]; then
 break
 fi
/sbin/route -q add $CURR_LINE_IP 127.0.0.1
/bin/echo $CURR_LINE_IP >> /root/banlist.txt
/bin/echo "Subject: $CURR_LINE_IP ipden $CURR_LINE_CONN Connect Refused."
done < $TMP_FILE
/bin/rm -f $TMP_PREFIX.*
01/01/2015 15:00 .Shōgun#2
rm /root/banlist.txt
01/01/2015 15:04 morion77#3
Quote:
Originally Posted by .Shōgun View Post
rm /root/banlist.txt
Don't Work
01/01/2015 15:48 .Ryuzaki™#4
cd /root && rm -R banlist.txt ?
01/01/2015 16:07 Gillette Kaito#5
Quote:
Originally Posted by .Shōgun View Post
rm /root/banlist.txt
Quote:
Originally Posted by .Xynex™ View Post
cd /root && rm -R banlist.txt ?
bitte les dir erstmal den thread durch.
01/01/2015 16:18 morion77#6
Solved rebooting machine and clean banlist.txt
01/01/2015 16:47 .Ryuzaki™#7
Quote:
Originally Posted by RealKagami View Post
bitte les dir erstmal den thread durch.
Wenn er die entfernt, dann funkt. es auch nicht mehr. Also bitte
ließ es dir selber erstmal durch :facepalm: