[K12OSN] Enhancement to squidGuard package to force Google's SafeSearchfeature to be ON

Matt Ross mross at esd165.org
Wed Apr 28 23:03:55 UTC 2004

Hi Eric. I'm new to the list, so forgive me if this has been answered 
somewhere already.

I was looking at the email below, and attempted to implement it on my 
existing Squid system for my school. Great idea, but I can't figure out 
how you got it working...

 >     s@(google.com/search.*q=.*)@\1\&safe=active i

The above line doesn't make sense to me. Here's my problem: How does 
"\1\" bring back the requested URL? According to SquidGuard's homepage, 
%u should do that trick. But neither works for me, only static 
destinations work...

Also, you don't have the third "@", which seems to be required for my 
rewrites. Perhaps you are running a different version of squidGuard? 
(I'm using Debian's 1.2.0-1 version of squidGuard, FYI.)

If you can give me some hints on why/how this is happening, I'd greatly 
appreciate it. Otherwise, I'll probably be writing my own redirector for 
this very purpose.


Eric Rote:

 >I wrote a patch for squidGuard that enhances the URL re-writting 

 >The main purpose of this was to make it possible to force Google's 
 >feature to always be ON.

 >In the revised squidGuard.conf, I added a new rule that appends 
 >to any search made at google.com (including images.google.com and
 >groups.google.com). Here's the new rule:

 >rewrite google {
 >    s@(google.com/search.*q=.*)@\1\&safe=active i
 >    s@(google.com/images.*q=.*)@\1\&safe=active i
 >    s@(google.com/groups.*q=.*)@\1\&safe=active i
 >    s@(google.com/news.*q=.*)@\1\&safe=active i
 >    # log google

 >This is made active by adding "rewrite google" in the default acl section
 >(active by default in the new squidGuard.conf).

 >I am running these revised packages on my production servers, once I'm
 >sure that they are fully stable I'll put the packages into the yum/apt

 >If you want to test them out, the package can be found at:

 >  ftp://k12linux.mesd.k12.or.us/pub/K12LTSP/testing/RPMS/

 >This package will works on K12LTSP 3.1.2 and 4.0.0.


More information about the K12OSN mailing list