[Home] [Credit Search] [Category Browser] [Staff Roll Call] | The LINUX.COM Article Archive |
Originally Published: Monday, 13 September 1999 | Author: Brad Marshall |
Published to: enchance_articles_security/Advanced Security Articles | Page: 1/1 - [Printable] |
ACL's under Squid - by Brad Marshall
Squid has many ways of restricting access to, and limiting what the users can do. We will cover basic access control lists, and how these can be used from forcing requests to go through a parent proxy to restricting access to the proxy. Additionally, we will cover how to password protect the proxy, and how to implement delay pools (restricting bandwidth use).
|
Page 1 of 1 | |
ACLs and Delay Pools Under Squid
Squid has many ways of restricting access to, and limiting what the users can do. We will cover basic access control lists, and how these can be used from forcing requests to go through a parent proxy to restricting access to the proxy. Additionally, we will cover how to password protect the proxy, and how to implement delay pools (restricting bandwidth use). ACLs have many options to restrict access based on source ip address, destination ip address, source domain, and destination domain. This is done by:
To restrict access to the Squid proxy via the time, use the format:
It is also possible to force requests to either go directly to the source, or to go through any parent or sibling proxies. Forcing all traffic through neighbourhood proxies is useful in a situation where traffic to the parent proxy is a lower cost than direct traffic. Forcing traffic to go directly to the server is usually used to force local requests (for example, hosts in an intranet). The standard way of configuring this is:
By default, Squid comes with traditional proxy authentication in the SQUID_SRC_ROOT/auth_modules/NCSA directory. To compile it, cd into this directory and type:
Another useful squid feature is delay pools. Conceptually, delay pools are bandwidth limitations - ``pools'' of bandwidth that drain out as people browse the Web, and fill up at a rate you specify - this can be thought of as a leaky bucket that is continually being filled. This is useful when bandwidth charges are in place, as in Australia where volume charges are typical, or if you want to reduce bandwidth usage for web traffic. To enable this, configure squid with the --enable-delay-pools option. There are 3 classes of delay pools - class 1 is a single aggregate bucket, class 2 is an aggregate bucket with an individual bucket for each host in the class C, and class 3 is an aggregate bucket, with a network bucket (for each class B) and an individual bucket for each host. To configure the amount of delay pools, and specify which pool is which class, use the following format.
Each of these parameters is specified as restore / maximum - restore being the bytes per second restored to the bucket, and maximum being the amount of bytes that can be in the bucket at any time. It is important to remember that they are in bytes per second, not bits. To specify that a parameter is unlimited, use a -1. If you wish to limit any parameter in bits per second, divide this amount by 8, and use the value for both the restore and the maximum. For example, to restrict the entire proxy to 64kbps, use:
For further explanation and examples, please see the default squid.conf file comments. As you can see, Squid provides many way of limiting access to it, both by restricting who can use it, and how much they can use it. There are many more options to Squid than covered here, but the defaults are reasonable for most cases. Brad Marshall is a Systems Administrator for Plugged In Software, a software development company based in Brisbane, Australia. He has been using Linux for more than 5 years, and has a BSc majoring in Computer Science.
| |
Page 1 of 1 |