![]() |
|
#1
|
|||
|
|||
Create a batch file on linuxHi;
i want to run (netstat -an | grep ":80 "| awk '{print $5}'|cut -d":" -f1 | sort |uniq -c | sort -nr | head -20 | grep -v -E "127.0.0.1|0.0.0.0") <-- this command every 30 second and if result is higher than 30 automaticly drop that ip adres. [root@xxx ]# netstat -an | grep ":80 "| awk '{print $5}'|cut -d":" -f1 | sort |uniq -c | sort -nr | head -20 | grep -v -E "127.0.0.1|0.0.0.0" 141 xx.yy.152.87 72 yy.xx.146.110 67 xx.yy.136.9 46 yy.xx.41.60 42 yy.xx.223.140 32 xx.xx.140.90 21 yy.xx.45.169 7 xx.xx.245.75 result > 20 : which ips 141 xx.yy.152.87 72 yy.xx.146.110 67 xx.yy.136.9 46 yy.xx.41.60 42 yy.xx.223.140 32 xx.xx.140.90 21 yy.xx.45.169 i want to ban (drop) that ip adresses with automaticly every 30 second How can i do this ? |
|||
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 08:44 |
| After execution - Error cannot locate /Skin File? | WSCH | C++ Forum | 1 | 05-Mar-2005 21:03 |
| Linux Kernel Upgrade Mini Howto | dsmith | Computer Software Forum - Linux | 3 | 05-Apr-2004 23:10 |
| CD Buring Failed | skanth2000 | Computer Hardware Forum | 1 | 15-Nov-2003 04:52 |
| Create a batch file on linux | JdS | Web Hosting Forum | 8 | 13-Jan-2003 20:59 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The