Nagy Zoltán Márk wrote:
> Is there any opportunity for apache 2.0 where i can restrict clients
> through time/request?
> For example: accept maximum 20 requests from an apache client in a second.

I don't think this is possible with stock Apache 2 (and it probably is the
wrong place for such restrictions) but if you're using Linux 2.6 look
at iptables's hashlimit module.

Example:

  $IPTABLES -A INPUT -p tcp --syn -d IP --dport 80 -j HASHLIMIT

  $IPTABLES -A HASHLIMIT \
    --match hashlimit --hashlimit-name demo_site --hashlimit-mode srcip,dstip \
    --hashlimit 1/minute --hashlimit-burst 1 --hashlimit-htable-expire 20000 
--hashlimit-htable-gcinterval 1000 -j ACCEPT

This allows 1 request per 20 seconds from IP.

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to