Close
Social profiles

Squid content filtering from Squid Proxy Server

Content filtering like Video, Audio, exe, mp3, avi, flv and document files can be filtered via Squid Proxy Server.

Block / download of music MP3, mpg, mpeg, exec files;

First open squid.conf file /etc/squid/squid.conf:

# vi /etc/squid/squid.conf

Now add following lines to your squid ACL section:

acl blockfiles urlpath_regex "/etc/squid/BlockMusicFile"
http_access deny blockfiles

Save and close the file.


Now create /etc/squid/BlockMusicFile file:

# vi /etc/squid/BlockMusicFile

Append following text:

\.[Ee][Xx][Ee]$
\.[Aa][Vv][Ii]$
\.[Mm][Pp][Gg]$
\.[Mm][Pp][Ee][Gg]$
\.[Mm][Pp]3$

Save and close the file. Restart Squid:

# /etc/init.d/squid restart

4 thoughts on “Squid content filtering from Squid Proxy Server”

Leave a Reply

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

Close