Monday, June 30, 2008

Restricting downloads with squid!

Many times you may want to deny users from downloading huge files
using the proxy server. This blog will help you do that with squid
in GNU/Linux.

To Readers: All those starting with # are run by root user and ;'s are comments inside the configuration files

Here we are using reply_body_max_size TAG in squid.conf

#vim /etc/squid/squid.conf

acl limitme src
reply_body_max_size 2097152 allow limitme
reply_body_max_size 0 allow all

By default, there is no restriction on the maximum
file that can be downloaded.

Here limitme acl is allowed only a maximum
of 2 MB download.

2097152 bytes = 2097152/1024 Kbytes => 2048 KB => 2 MB

~mj0vy (sreejith dot anujan at gmail dot com)


gorvam said...

thank you sir very very thank you

gorvam said...

also tell me more about that type of knowledge

Rachit Jain said...

gud post.
keep it up.....