Download Limit
Current I have a NAT running on Mandrake 10.2 with Shorewall & Squid.
Is there away to set download limit per client (base on IP or MAC)?
i.e. Say for the period of a 4 weeks, a client will be allocated with 1 G of download usage. If any time within the 4 weeks, the client excess the 1G download limit, some action will be taken like, redirect to an error message web page, or limit download rate. Of course the idea, is that the 1G limit will be reset at the beginning of every 4 weeks.
Is there any tool that can be configured to achieve this?
After alot of searching, all I can find is statically restrict client excess the internet. Like manaully define in the Squid or Shorewall to deny IP or MAC.
I want something like.
If 192.168.0.100's current download count >= 192.168.0.100' DOWNLOAD LIMIT
//Take Action
foward all http to port
drop everything else
end if
If 192.168.0.100 used time so far == 192.168.0.100's PERIOD
/Reset download counter
192.168.0.100's download counter = 0
end if
|