CODE
Banning an IP
iptables -A INPUT -p all -s IPHERE/32 -j DROP

CODE
Unbanning and IP
iptables -D INPUT -p all -s IPHERE/32 -j DROP

CODE
Listing the last five ip’s with the most connections
netstat -atnp -A inet | grep “:80″ | awk -F ” ” ‘{print $5} ‘ | awk -F “:” ‘{print $1}’ | sort | uniq -c | sort -nr | head -5

CODE
Listing total connections
netstat -nap | grep ESTABLISHED | wc -l
netstat -nap | grep SYN | wc -l
netstat -nap | grep TIME_WAIT | wc -l