How to Limit download size in Squid

FREQUENTLY ASKED QUESTIONS  (Squid Proxy)
Q: How to limit download size in squid proxy ?


  By specifying the maximum allowed size as "reply_body_max_size", Squid can prevent users downloading large files. For example prevent users downloading files larger than 50MB. 

So when a replay body comes the "reply_body_max_size" parameter checks and deny if file size is larger than 50MB.


Add the below acl configurations to squid configuration file
[root@server ~#]vi /etc/squid/squid.conf


#First create an acl
acl limited_users src 192.168.0.0/24

#Deny downloading larger than 50MB for above acl
reply_body_max_size 50 MB limited_users


Reload squid service
[root@server ~#]service squid reload

1 comments:

Mr. Perfactionist said...

Thats right... it works. But do you know there is still a loop hole. Whenever any client behind the proxy wants to download a file of larger size, they can easily download any size of file by just putting interrogation[ ? ] at the end of download url.

Now what we can do to block this??

Related Posts Plugin for WordPress, Blogger...

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons