Posted by peter on October 13, 2011
Set up bandwidth quotas with “squished” as follows:
browse to the “/” folder and “unzip” the squish.tar.gz file as follows:
tar -vzxf squish.tar.gz
Browse to the directory created and install squished with the following series of commands:
cd squish-0.0.18
make install
Edit and configure the /etc/squid/squish.conf file to look similar to the following depending on the users and requirements:
The following is an example of the "/etc/squid/squised.conf" file
---------------------------
# This file contains data formatted as follows:
#
# Blank lines and hashed stuff is for comments
# user amount/period
# bandwidth: 999[kmG]b / period: day, week, month
# time: 999[smh] / period: day, week, month
# Whitelist entries - they can have as much as they like
192\.168\.99\.44 25h/day
192\.168\.97\.43 25h/day
# Poor guy:
fred 1h/day 1Mb/day 5Mb/week
john 1h/day 1Mb/day 5Mb/week
tracy 2h/day 2Mb/day 10Mb/week
rob 2h/day 2Mb/day 10Mb/week
digby 2h/day 1Mb/day 5Mb/week
# Catchall -- people and IP's not matched by the above rules
.* 1h/day 0.5Mb/day 5h/week 3Mb/week
------------------------
Browse to the /etc/httpd/conf folder and edit the httpd.conf file with the following include:
Include /usr/local/squish/apache-squish.conf
restart squid and apache with the following commands:
service squid restart
service httpd restart