Created
July 3, 2017 07:34
-
-
Save morteza-mori/3c8a793c95d4b7960482ed8a6cd25ce8 to your computer and use it in GitHub Desktop.
Dos checking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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