Open squid.conf file
sudo vim /etc /squid3/squid.conf
search for reply_body_max_size you can see a line like this
reply_body_max_size 10 MB it will limit the download by 10 MB.
This option specifies the maximum size of a reply body. It can be used to prevent users from downloading very large files, such as MP3’s and movies.
To prevent download of a particular file type you can use regular expressions
acl mp3_ext url_regex -i \.mp3$
This acl is to prevent mp3 downloads.The http_acces for this acl is
http_access deny mp3_ext
To prevent youtube streaming
acl flash rep_mime_type video/x-flv
and the http_acces
http_reply_access deny flash
We can group different types and write it in a file and can be asked to block
acl denied_filetype url_regex "/etc/squid3/denied_filetype"
Now the types written in the file denied_filetype will be blocked with the below http_access
http_access deny denied_filetype