0

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.

ensnare
  • 2,212
  • 7
  • 24
  • 40

1 Answers1

3

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.

AlexTsr
  • 606
  • 3
  • 5
  • Thanks -- would you have a line-by-line working configuration example? Thanks. – ensnare Apr 09 '11 at 09: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 09 '11 at 09:15