Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morteza-mori/3c8a793c95d4b7960482ed8a6cd25ce8 to your computer and use it in GitHub Desktop.
Save morteza-mori/3c8a793c95d4b7960482ed8a6cd25ce8 to your computer and use it in GitHub Desktop.
Dos checking
All connections to server
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
All connection States
netstat -nat | awk '{print $6}' | sort | uniq -c | sort -n
Limit HTTP connections to 20 sessions
iptables -I INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above
20 --connlimit-mask 24 -j DROP
Checking how many connections to 80
netstat -n | grep :80 |wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment