3 ms·
While running one of the largest free hosting providers we had many of these smaller attacks; usually some netstat & iptables incantations will ward them off. S
by tluyben2 13y ago
While running one of the largest free hosting providers we had many of these smaller attacks; usually some netstat & iptables incantations will ward them off. Something like
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
will show how many connections per IP for instance; with smaller attacks, usually, to actually make a dent in your webserver, the attackers will open many connections per IP. That helps you identify the 'bad' IPs. As someone else said; a lot of them are from eastern EU/Russia; you can use that information to be a bit more sure about what makes a bad IP a bad IP before you block it. Also check the Agent strings; often they all have the same Agent which is another way to filter.
We used to have tons of scripts running to try to identify the 'enemies'; in the end the simplest thing was the best; block everything with a lot of connections and open them up 24 hours later.