Linux: Back to “SQUID” – How to limit download of large files.

Leave a comment

October 29, 2014 by aubreykloppers

Over the last couple of days I have been looking into giving mobile devices (iPhones/SmartPhones/Tablets) access to my network.  Specifically to install and use things like PlayStore and iTunes without using the data on the devices.  The one thing that always gets me is that these kind of devices will always try and update themselves with the latest Operating system software.  I do not mind the update of packages, but in South Africa we pay prime for bandwidth and access to these kind of update-technologies just do not play nicely with my business.

How do you stop updates?:

Well, it turns out to be quite easy.  You have to write some squid code into your squid.conf file to facilitate the devices.  I am using pfSense, but if you use squid on a linux server, you can edit your squid.conf file directly.  For pfSense you go to:

Services/Proxy Server and modify the “Custom Options” block.  In my case I used the following.  A full explanation of what I did follows after the code:

acl sized-users src 10.0.0.157-10.0.0.165
http_access allow sized-users
reply_body_max_size 50 MB sized-users
request_body_max_size 1 MB sized-users

— Explanation —:

line1: Create an ACL with an IP SOURCE RANGE.
line2: Allow the ACL to use the defined access-list.
line3: Maximum download size for the ACL.
line4: Maximum upload size for the ACL.

That’s it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: