Close
Social profiles

How to Limit Upload size in Squid

How to Limit Upload size in Squid

Scenario : You have two subnets 192.168.1.0/24 and 192.168.2.0/24, Then you have to limit the Upload size,

192.168.1.0/24  – 2 MB
192.168.2.0/24 – 1 MB
Others – 5MB

Add the following line in the squid.conf file

$ su -
# vim /etc/squid/squid.conf

You can use IP based Upload limit (version squid-3.1 and higher)

acl Subnet1 src 192.168.1.1-192.168.1.100/24
acl Subnet2 src 192.168.2.1-192.168.2.100/24
request_body_max_size 20480 KB Subnet1
request_body_max_size 10240 KB Subnet2
request_body_max_size 5120 KB all

Time Based Upload Limit

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

3 thoughts on “How to Limit Upload size in Squid”

  1. I just want to mention I am new to weblog and certainly enjoyed this page. More than likely I’m want to bookmark your website . You amazingly have impressive articles and reviews. Kudos for revealing your web page.

Leave a Reply

Your email address will not be published. Required fields are marked *

Close