Block music/download through Squid
We might need to BLOCK certain types of files to be downloaded, like mp3/mpeg/avi/exe and other and display our customized error-message.
STEP #1 – vim /etc/squid/squid.conf — add these lines under your ACL section
acl blockfiles urlpath_regex "/etc/squid/blocks.files.acl"
# Deny all blocked extension
deny_info ERR_BLOCKED_FILES blockfiles
http_access deny blockfiles
STEP #2 – Create rule file for blocking certain types of file.
STEP #3 – Create customized error file under /usr/share/squid/errors/English/ directory.
<TITLE>ERROR: Blocked file content</TITLE>
<H1>File is blocked due to our IT policy</H1>
<p>Please contact Network NUTS admin for more information:</p>
STEP #4 – Restart the squid service.
service squid restart; chkconfig squid on
Check more on linux at http://networknuts.net