RE: [squid-users] block downloading extensions...!!

From: SSCR Internet Admin <admin@dont-contact.us>
Date: Wed, 12 Mar 2003 09:32:30 -0800

I have this one on my config, and it works great

acl dl-filter urlpath_regex -i "/etc/squid/file_ext.block"

http_access deny dl-filter

and the content of file_ext.block

is

\.dll$
\.ini$
\.asf$
\.exe$
\.avi$
\.mp3$
\.mpeg$
\.mpg$
\.asf$
\.mp3$

and so on ..etc..

-----Original Message-----
From: Prasanta kumar Panda [mailto:prasanta.kumar@wipro.com]
Sent: Monday, March 10, 2003 6:38 AM
To: Henrik Nordstrom; NetSnake
Cc: squid-users@squid-cache.org
Subject: RE: [squid-users] block downloading extensions...!!

With first method you will get problem with cached sites i.e.

http://test.one.com/dwonload.exe?cache ....

Will not get blocked with -i \.exe$

Where as problem with mime type is that the mime.conf get overwrites with
the response from server I.e.

As per squid mime.conf .exe is application/octet-stream, but your rules to
block application/octet-stream don't work when you download from MS site as
it returns mime type as "application/x-msdownload".

Reg.
Prasanta

-----Original Message-----
From: Henrik Nordstrom [mailto:hno@squid-cache.org]
Sent: Monday, March 10, 2003 7:29 PM
To: NetSnake
Cc: squid-users@squid-cache.org
Subject: Re: [squid-users] block downloading extensions...!!

mån 2003-03-10 klockan 12.05 skrev NetSnake:
> It's very simple:
>
> acl MyDenyMIME urlpath_regex -i \.exe \.mov \.mpg \.mp?

you also need $ after the extension, and it is not at all related to MIME
types, only file extensions in the requested URL..

acl MyDenyExtensions urlpath_regex -i \.exe$ \.mov$ \.mpg$ \.mp?$

> acl deny MyDenyMIME

http_access deny MyDenyExtension

If you want to block based on MIME types then see the rep_mime_type acl and
http_reply_access.

Regards
Henrik

--
Henrik Nordstrom <hno@squid-cache.org>
MARA Systems AB, Sweden
--
This message has been scanned for viruses and
dangerous contents on SSCR Email Scanner Server, and is
believed to be clean.
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/2003
-- 
This message has been scanned for viruses and
dangerous contents on SSCR Email Scanner Server, and is
believed to be clean.
Received on Tue Mar 11 2003 - 18:22:20 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:14:01 MST