Re: [squid-users] Data transfer limit

From: Barry Irwin <bvi_at_lair.moria.org>
Date: Thu, 16 Oct 2008 10:38:59 +0200

Morning

to do this you need to implement some kind of quota system. In essence
you need to rotate your logs ( hourly, daily etc) and then put some
little script together that adds up the traffic associated with each
user account. This can then be used to feed an ACL denying access.

The implementation of the acl can be as simple as a text file, or using
external ACLS you can query a DB.

Barry

RM wrote:
> I've tried searching through the archives for data transfer limits but
> all I can find is stuff on bandwidth limiting through the use of delay
> pools to restrict users to a specific transfer rate.
>
> Here is my situation. I have a Squid server on the internet that users
> around the world can connect to but it requires that they know their
> own username and password (this is not an open proxy) in order to
> connect. So I have this in my squid.conf:
>
> auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
> auth_param basic children 5
> auth_param basic realm Squid proxy-caching web server
> auth_param basic credentialsttl 2 hours
> auth_param basic casesensitive off
>
> acl ncsa_users proxy_auth REQUIRED
> http_access allow ncsa_users
>
> /etc/squid/passwd has a list of usernames and their associated
> passwords. How can I limit each user to a specific amount of data
> transfer per month such as 100GB. I do not want to limit the rate to
> anything such as 64kbps. I want my users to use my full 10Mbps
> connection if they can but once they reach 100GB of transferred data,
> I want to disable them.
>
> Is this possible?
>
> Thanks
Received on Thu Oct 16 2008 - 08:39:19 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 16 2008 - 12:00:04 MDT