Re: [squid-users] Restriction of downloads for specific url

From: Jens Strohschnitter <[email protected]>
Date: Tue, 17 Oct 2006 11:35:47 +0200

> > Hi list,
> >
> > is it possbile to configure squid to block any .exe files
> > for download but allow the download from specific url.
> > I have blocked all downloads from .exe-files via acl:
> >
> > acl exe-users src "/etc/allowed_downloads_exe"
> > acl exe-files urlpath_regex -i \.exe$
> >
> For what it's worth, this rule can be circumvented by appending a ? to
> the end of the URL (e.g. http://www.example.com/program.exe is blocked,
> but http://www.example.com/program.exe? will allow the download).
> Adding an additional block based on rep_mime_type might help some.
> > [...]
> >
> acl dstdomain allowed_exeurls "/etc/allowed_exeurls" # Use url_regex or
> urlpath_regex ACLs as appropriate
> > http_access allow exe-users exe-files
> >
> http_access allow allowed_exeurls exe-files
> > http_access deny exe-files
> >
> > But now I want to allow .exe-download for a specified
> > url in a file like /etc/allowed_exeurls.
> >
> > How can I configure squid to work so ? Thx.
> >
> >
>
Hi

thanx for the tips. I have added the following lines to squid.conf:

[...]
acl EXEURLS url_regex "/etc/allowed_exeurls"
[...]
http_access allow GET EXEURLS
[...]

/etc/allowed_exeurls contentes for example:
www.example.com
from where any download of exe-files are allowed.

Now it works as I wanted ;-)

-- 
Regards,
     Jens Strohschnitter
-------------------------------------
*!!!LINUX LINUX LINUX LINUX LINUX!!!*
 
* http://www.jens-strohschnitter.de *
-------------------------------------
Set the controls for 
		 the heart of the sun
-------------------------------------
Received on Tue Oct 17 2006 - 03:35:55 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Nov 01 2006 - 12:00:04 MST