Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Squid3 server and I'd like to restrict the bandwidth of certain websites. For example:

How can I make www.example.org/* load at no more than 10KB/s?

Thanks.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Your answer lies within Delay Pools

What you have to do is,

  1. Make an access list that describes your traffic. In this case something like acl LimitedDomains dstdomain example.com
  2. Define how many Delay Pools you need. Delay Pools are different Bandwidth Rules. i.e. delay_pools 2
  3. Next define what class should each Pool be. i.e. delay_class 1 1 which means that Pool 1 will be Class 1 (see bellow about classes
  4. Match each pool with an Access List. i.e.

    delay_access 1 allow LimitedDomains

    delay_access 1 deny all

  5. Then set the parameters of the Pool. The parameters depend on the Class you chose but essentially are the bandwidth limit in Bytes per IP/Network/User. i.e. delay_parameters 10000/10000

For more detailed information on Pools, Classes, etc look here.

share|improve this answer
    
Thanks -- would you have a line-by-line working configuration example? Thanks. –  ensnare Apr 9 '11 at 9:11
1  
The examples I gave above are more or less what you want. You can use them as a guide and change accordingly. Cheers. –  AlexTsr Apr 9 '11 at 9:15
add comment

Your Answer

 
discard

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.