I want to limit the number of requests that we get from single IPs, using squid (assume I have to use squid for political reasons), blocking those that make too many requests in a set period of time.
I was considering writing a short Perl script and an external_acl_type, with a delay pool, but I am unsure as to what parameters I can pass to the helper function.
something like:
external_acl_type rate_limit /usr/bin/squid-access-control dst
but I am not sure if that would work?
Best Answer
So the solution I came up with, which I think is quite worth documenting, is as follows: