Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Dec 2002 01:15:01 -0500
From:      "Bob Hall" <rjhalljr@starpower.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: squidGuard & starting squid
Message-ID:  <20021209061501.GA6463@sten.alder.net>
In-Reply-To: <55141.203.11.225.5.1039402268.squirrel@www.futureuse.net>
References:  <20021208214035.GA582@sten.alder.net> <55141.203.11.225.5.1039402268.squirrel@www.futureuse.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 09, 2002 at 01:51:08PM +1100, Aaron Hill wrote:
> Hi Bob,
> 
> I run a lot of Squid + Squidguard machines, I'll have a go at your
> questions ...
> 
> > I'd like to automatically start squid with the -D option. Can
> > someone tell me what I have to edit to do this?
> 
> First of all on a standard Squid ports or package installation the startup
> script should be here ...
> 
> /usr/local/etc/rc.d/squid.sh
> 
> So that's the file you want to edit. Change the line ...
> 
> if [ -x ${PREFIX}/sbin/squid -a -f ${PREFIX}/etc/squid/squid.conf ]; then
> 
> ... to ...
> 
> if [ -x ${PREFIX}/sbin/squid -aD -f ${PREFIX}/etc/squid/squid.conf ]; then
> 
> ... and you should be right. The commands to stop and start Squid after
> making these changes are ...
> 
> /usr/local/etc/rc.d/squid.sh stop
> 
> /usr/local/etc/rc.d/squid.sh start

Thanks for the response. 

Is there a difference between 
    squid.sh start
and 
    squid -k shutdown
? Is one preferable?

> > Also, I'm using Sleezeball to block banner ads. I'd like to use
> > squidGuard, because of its other capabilities. With Sleezeball, I  can
> > tell it to look for any URL containing, for example, '/advertisers/',
> > and Sleezeball blocks it. SquidGuard seems to block entire sites, or
> > nothing. It doesn't seem to have any effect on just banner ads. Is there
> > a way to get squidGuard to remove just the ads?
> 
> SquidGuard can block sites based on regex. This link shows how to set up
> the conf file for a regex ban/redirect ...
> 
> http://www.squidguard.org/config/#example06
> 
> ... and after you install SquidGuard this file ...
> 
> /var/db/squidGuard/porn/expressions
> 
> ... shows you how you can create working regex expressions. BEWARE! Don't
> look in this file if you take offense to a fairly wide range of
> expletives. Such is the nature of porn sites.
> 
> So you can probably create a regex that matches */advertisers fairly easily.

Thanks, but that's exactly what I'm having trouble doing. I can block 
an entire site, but I can't block the parts I don't want, e.g. banner 
ads, and leave the parts I do want, e.g. the Dilbert cartoon. I tried 
copying the porn expressions file to the ad directory and modifying it 
for ads (banner, banners, ads, advertisers, etc), but squidGuard ignored 
it. It had no effect on URLs containing the matching words.

Bob Hall

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021209061501.GA6463>