Re: [users@httpd] apache 2.0 time/request client limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi!

Yes, but this restricts via IP and it can be occured, that more
clients use the same IP as a gateway.

king regards,
mark

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: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
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: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux