 |
Mycket flitig postare
|
|
Reg.datum: Jun 2007
Inlägg: 568
|
|
Mycket flitig postare
Reg.datum: Jun 2007
Inlägg: 568
|
Pröva följande:
root@xxx:~/scripts/bash# cat active_connections.sh
#!/bin/sh
netstat -an | grep ":80" | awk '{print $5}' | grep -o "[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" | egrep -v "(`for i in \`ip addr | grep inet | cut -d/ -f1 | awk '{print $2}'\`;do echo -n "$i|"| sed 's/\./\\\./g;';done`127\.|0\.0\.0)" | sort -n | uniq -c | sort -n
|