Re: [squid-users] squid redirect question

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 29 Jul 2011 13:18:16 +1200

On 29/07/11 01:50, Bruce Bauman wrote:
> I am running a web browser, squid, and squidguard all on a single
> machine. I am *NOT* running a local webserver. I want to do web
> filtering based on some blacklists configured into squidguard.
>
> My current configuration has squid configured as follows:
>
> redirect_program /usr/local/bin/squidGuard \
> -c /usr/local/etc/squid/squidGuard.conf
>
> and squidguard configured to redirect as follows:
>
> acl {
> default {
> pass !porn all
> redirect file://block.html
> }
> }
>
> This fails because squid tries to interpret the URL passed back by
> squidguard.

You are not redirecting. There is no 3xx status code passed back to Squid.

What you are doing is re-writing. Telling _Squid_ to fetch the altered
URL. Which it can't for file://

Send back: 302:file://block.html

>
> What I really want is to just pass back the failure to the originating
> browser and deal with the blocked access there.
> How can I get squid to
> just pass back to the browser. Since it's our custom browser we can deal
> with generating the error there.
>

Or you could use the Squid ACLs for their designed use in http_access
and supply custom errors via the deny_info directive.

Reducing by >30% the software complexity.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.14
   Beta testers wanted for 3.2.0.10
Received on Fri Jul 29 2011 - 01:18:23 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 29 2011 - 12:00:03 MDT