I've asked this question on StackOverflow, but nobody answered, until yesterday... and the answer was a suggestion... to ask this here :). So... can someone help me with this :
I'm new in networking and security and I have a problem with HTTPD server on FreeBSD. If someone make a lot of requests, httpd servers dies.... Can anyone tell me a solution to prevent
httpd from dying or how to add and
ipfw rule that will block for 60 seconds any connection to the server from an IP that has made over 5 requests/second in the past second.
ie : if someone opens the website and keeps F5 button pressed,
httpd restart is not working anymore, so I need to
httpd stop /
httpd start ....
This is what I found for
iptables -I INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --set iptables -I INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 5 -j DROP