From owner-freebsd-questions Sun Dec 8 22:15:59 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4BEDC37B401 for ; Sun, 8 Dec 2002 22:15:57 -0800 (PST) Received: from smtp01.mrf.mail.rcn.net (smtp01.mrf.mail.rcn.net [207.172.4.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2B7D43EA9 for ; Sun, 8 Dec 2002 22:15:56 -0800 (PST) (envelope-from rjhalljr@starpower.net) Received: from 66-44-68-198.s198.tnt8.lnhva.md.dialup.rcn.com ([66.44.68.198] helo=sten.alder.net) by smtp01.mrf.mail.rcn.net with smtp (Exim 3.35 #4) id 18LHCb-0005kz-00 for freebsd-questions@freebsd.org; Mon, 09 Dec 2002 01:15:43 -0500 Received: by sten.alder.net (sSMTP sendmail emulation); Mon, 9 Dec 2002 01:15:02 -0500 Date: Mon, 9 Dec 2002 01:15:01 -0500 From: "Bob Hall" To: freebsd-questions@freebsd.org Subject: Re: squidGuard & starting squid Message-ID: <20021209061501.GA6463@sten.alder.net> Mail-Followup-To: Bob Hall , freebsd-questions@freebsd.org References: <20021208214035.GA582@sten.alder.net> <55141.203.11.225.5.1039402268.squirrel@www.futureuse.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55141.203.11.225.5.1039402268.squirrel@www.futureuse.net> User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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