hi Steve, thanks for your help and your link clear lots of point abt squid.
But I have solve this problem as below, if anyone have same problem.
Check this out, which may help!
Squid with PAM authentication & Squish
Squish will be set to run as the download manager for squid, meaning
that daily, weekly or monthly
download & time limits can be set on users or IP address.In this
how-to we will set squid
to use PAM authenication and limit the montly bandwidth each user has
with squish. The programs
used in this guide will be:
Fuction: Total daily/weekly/monthly Bandwidth/Time Manager
Fuction: proxy caching server for web clients
download from http://www.ledge.co.za/software/squint/squish/
unzip into /install/
cd into the folder
then move yourself into the directroy that squish was installed in
- then run the install option on the squish.pl
- download the GD Graphics Library rpm's from the website below
- and then install it
rpm -ivh perl-GD-2.30-1.1.fc3.rf.i386.rpm
or you can get the source from http://www.boutell.com/gd/
run the command 'crontab -e' and then input the following into the file
5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/squish/squish.cron.sh
- then run the job for the first time
Now i'm going to use PAM to authenticate squid.
- now we need to edit the '/etc/squid/squid.conf' and add the
following lines in the right area's
(in the basic area authentication area)
auth_param basic program /usr/lib/squid/pam_auth
(in the acl's area)
acl pam proxy_auth REQUIRED
at this point you can edit the squid pam module '/etc/pamd.d/squid'
PAM (pluggable authenticate module) can authenticate against
almost anything, unix, LDAP, winbind. it has many, many uses so look
into PAM if you think it might be useful for you.
now set the right permissions on /usr/lib/squid/pam_auth
chmod u+s /usr/lib/squid/pam_auth
- now set the squid ACLs to the following.
added by squish (begin)
acl SQUISHLOC dst mc2.fedora.directory.server
acl SQUISHED1 proxy_auth "/etc/squid/squished"
deny_info http://ip-address-of-squish-serverr/squish/?squished& SQUISHED1
http_access allow SQUISHLOC
http_access allow pam !SQUISHED1
added by squish (end)
- now set the redirect in the apache configuration file
'cat /usr/local/squish/apache-squish.conf >> /etc/httpd/conf/httpd.conf'
- restart the apache and squid servers now
go to http://ip-address-of-squish-server/squish/squish.cgi
edit the '/etc/squid/squish.conf' to change the download/hours limits