Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to set up a Squid ACL in the following manner--

For example, my Squid Proxy Server has 10 IP addresses- now I have a user 'demouser'. I want that for the very first request sent to 'demouser' this user uses IP address #1, for the second request it uses IP address #2, for the 3rd request of the day it uses IP address #3 and so on till it uses up all IPs. One more level of control I would like is that once the user has used up all available IP addresses once per address, then it does not allow the proxy request to go through.

How do I set up such a configuration on Squid Proxy server ACL?

Even a document or how to would be very helpful. The official wiki talks about one 'weird' case- choosing an IP address based on time of day the request was made to the proxy server. The other cases are all regular use cases which are not even remotely near my requirement as specified above.

share|improve this question
Just curious, why do you want to do this? – devicenull Feb 29 '12 at 14:53
The Bing API officially disallows use of the API to check search engine rankings, hence I want to scrape search results from their website-- since this also has restrictions- eg if one IP tries to fetch more than 10 pages of results in a 24 hour period then that IP is blacklisted and not given any more results- so i have to set up the proxy...:( – Arvind Mar 1 '12 at 12:20
You are being caught for a different reason. Bing would not be crazy enough to ban you for just going 10 pages into their search results. You are probably making all 10 requests within a second, so they obviously know you are a bot. – Jay Oct 27 '12 at 16:36
Best keep it clinetside, as @sendmoreinfo suggests. The way you pose the question is perhaps too narrow, you may be better off looking for a wider view answer. Having said that, you could write an acl that checks if a client has used their allotment in the logs. Total PITA tho. This question borderlines on subverting access restrictions, mind. – Tom Newton Oct 27 '12 at 17:57

Squid is not designed for this. Implement this logic in your scraper, and then set up 10 users in Squid and 'tcp_outgoing_address' acl's that map one user to one outgoing address.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.