Squid content filtering: Block / download of music MP3, mpg, mpeg, exec file by extensions

h‮‬ttps://www.lautturi.com
Squid content filtering: Block / download of music MP3, mpg, mpeg, exec file by extensions

To block the download of music files (such as MP3, MPG, and MPEG) and executable files (such as EXE) using Squid content filtering, you can use the "acl" and "http_access" directives in your Squid configuration file.

Here's an example of how you can block these types of files:

  1. Define an access control list (ACL) for the file types you want to block. For example:

acl block_music urlpath_regex -i .mp3$ .mpg$ .mpeg$
acl block_exec urlpath_regex -i .exe$

  1. Use the "http_access" directive to specify that access to these file types should be denied. For example:

http_access deny block_music
http_access deny block_exec

This will block access to URLs that end with ".mp3", ".mpg", ".mpeg", or ".exe".

It's worth noting that this configuration will only block HTTP traffic. To block HTTPS traffic, you will need to use a method such as SSL bumping or SSL interception.

You may also want to consider using other tools and techniques, such as URL filtering or content categorization, to more effectively block access to inappropriate or unwanted content.

Created Time:2017-10-30 14:27:20  Author:lautturi