Squid Proxy Server Download/Upload Limit

We can limit the download/upload limit for particular user/ip range/time . This will help to not to create high load in the server during ofice time or some particular time or maybe some users .

download_limit_image

To limit for all :

 

reply_body_max_size 30 MB

 

User or User group based download and upload limit :

acl Group1 proxy_auth user1 user2
acl Group2 proxy_auth user3 user4
reply_body_max_size 20480 KB Group2
reply_body_max_size 10240 KB Group1
reply_body_max_size 5120 KB all

 

IP based download limit :

 

acl Group1 src 10.5.0.1-10.5.0.10/32
acl Group2 src 10.5.2.1-10.5.2.10/32
reply_body_max_size 20480 KB Group2
reply_body_max_size 10240 KB Group1
reply_body_max_size 5120 KB all

 

Time Based Download Limit :

 

acl WorkingHours time 08:00-17:00
reply_body_max_size 10240 KB WorkingHours