Zapping Ads with Squid and adzapper

Discuss Applications
User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Apr 26, 2003 10:52 am

Of course they use Linux, there ain't no Microsoft left in this house. But I have to tell you, they ain't no computer nurds and really don't have a lot of interest in computers. In fact my daughter is very interested in becoming an attorney at the moment (her cousin is in law school right now whom she just visited and my sister and her husband are both attorneys). It just goes to show that it doesn't take a lot of computer knowlege to use Linux without trouble. My daughter does all of her school work in OpenOffice, does email with Evolution, browses with Mozilla (heavily restricted until now), and she burns music CDs with xcdroast. I have given her very little help because I am a little impatient with user questions. My son basically uses it with the same success but not as often due to the grade level he is in. He would much rather that we are out riding our dirt bikes than sitting at home stuffed up in the house on the computer. He's an "outdoors" type of kid. :)

Tux
guru
guru
Posts: 689
Joined: Wed Jan 08, 2003 10:40 am

Post by Tux » Sat Apr 26, 2003 10:58 am

Of the 10 computers in my house I have 5 running Linux.
That's a 50% succes rate,
or a 50% failure rate if you have ambition like me :)
3 of them have to remain windows machines for development purposes...
I am going to have to see whether I can make this house for more Linuxy, for now I just have to settle for my Linux servers locking down the windows boxes.
It's cool that you have your kids started early with Linux, it's the best way.
How many PC's you got going over there in void house?

agent007
administrator
administrator
Posts: 254
Joined: Wed Feb 12, 2003 11:26 pm

Post by agent007 » Sun Apr 27, 2003 12:46 pm

OMG!!!!! This is 100 times better than Squid-guard.....I cant seem to go to any of the underground sites now. Had to temporarily bypass the PROX to post this. Guess its because of the terms as u mentioned VoidMain. Also, chain-loading is not needed here as Dansguardian connects to Squid and Squid is redirected to Ad-Zapper. WOW! This really puts u in total control..

Btw, I think I'll have to edit the words list, so that it wont be so *strict* in filtering out sites like this.....am using the alpha 2.7 version. and to think such a small package can do wonders....

thanks & rgds,

007

Void Main wrote:BINGO!! I think I found the solution I've been looking for. It's a true content filter that works in conjunction with Squid. In fact it wouldn't even let me view this thread because of a weighted combination of the words "porn", "warez", etc... It let me view the other threads and it really seems to work quite well. I am so impressed that I believe I will unleash it on the kids sometime this weekend which should make them very happy. Here's the link:

http://dansguardian.org/

I'm using v2.6.0. Now I'm hoping I can somehow make it slightly less restrictive for me. I think I will have no problem doing this in the squid config if I can't in the DansGuardian config.


agent007
administrator
administrator
Posts: 254
Joined: Wed Feb 12, 2003 11:26 pm

Post by agent007 » Mon Apr 28, 2003 12:22 pm

There has to be an easier way to add domains in the "exceptionsitelist" file.......

rgds,
007

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Apr 28, 2003 12:50 pm

I am running a combination of dansguardian, AdZapper, squidGuard, and my own additional rules. It's working very well and if I want to bypass dansguardian I just set my browser's proxy to port 3128 rather than 8080 and all of the filters except dansguardian will be in effect. I have it set up so the kids can not access the proxy on 3128, they must go throgh 8080.

Now about the exception list, what did you have in mind as far as making it easier? I personally don't mind editing the exception list files directly but it wouldn't be hard to write a little CGI program so it can be modified via browser. In fact I could slightly modify my existing CGI group/site editor to include the dansguardian lists. Or just change it and dedicate it to a dansguardian configurator. But just using vi for me is easier. :)

agent007
administrator
administrator
Posts: 254
Joined: Wed Feb 12, 2003 11:26 pm

Post by agent007 » Mon Apr 28, 2003 12:59 pm

How about,

1) Squid logs all the visited domains not urls.....

2) Paste the stuff directly to the "exceptionlist"

bye,
007

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Apr 28, 2003 1:16 pm

I don't understand what you mean. If you put everything that has been visited into the exception list then you will end up with no filtering. I guess I am missing what you are trying to say. Another great tool if you haven't used it is sqmgrlog (or now it's called SARG). It is a report generator for Squid. It breaks out internet usage by user, date, sites, etc... I've been using it for a few years now:

http://web.onda.com.br/orso/sarg.html

Get the latest 1.4.1 source, I think the RPM is outdated. I should create RPMs for RH8.0 and RH9. Maybe I'll do that now...

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Apr 28, 2003 7:42 pm

I have created an RPM that will work in both RH 8.0 and RH 9. It is tailored for Red Hat and also installs cron scripts in /etc/cron.{daily/weekly/monthly}. You may want to disable the squid log rotation script that is installed by squid (/etc/logrotate.d/squid) as this RPM will rotate the logs once a month (that might be too much log for you, if it is you might want to leave it the way it is and just use the daily reports). The "sarg" RPM an SRPM can be found in my RPMS directory:

http://voidmain.is-a-geek.net/files/RPMS/

agent007
administrator
administrator
Posts: 254
Joined: Wed Feb 12, 2003 11:26 pm

Post by agent007 » Mon Apr 28, 2003 9:09 pm

Everything will not go to the exceptionlist....What I mean was, let squid create a separate log file with all the visited domain names in them. In this file there will be no other info except domains. This file has nothing to do with dansguardian and will be stored in the /var/log/squid directory.

Now, it will be upto the sys admin to go through the file and take some domains from there which he finds are 100% safe and just paste them into the "exceptionlist" file of dansguardian.

rgds,
007

Void Main wrote:I don't understand what you mean. If you put everything that has been visited into the exception list then you will end up with no filtering. I guess I am missing what you are trying to say. Another great tool if you haven't used it is sqmgrlog (or now it's called SARG). It is a report generator for Squid. It breaks out internet usage by user, date, sites, etc... I've been using it for a few years now:

http://web.onda.com.br/orso/sarg.html

Get the latest 1.4.1 source, I think the RPM is outdated. I should create RPMs for RH8.0 and RH9. Maybe I'll do that now...

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Apr 28, 2003 9:24 pm

Install the "sarg" RPM I built. It might be just what you are looking for. It breaks the log down many different ways. One view is "top sites" report which lists the most visited hosts (sorted in most visited order).

agent007
administrator
administrator
Posts: 254
Joined: Wed Feb 12, 2003 11:26 pm

Post by agent007 » Wed Apr 30, 2003 1:04 pm

VoidMain,

I was going through the logs and came across this:-

May 1 00:20:57 localhost dansguardian: Error connecting via ipc to url cache


Is it important? what does that mean?

thanks,
007

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Wed Apr 30, 2003 1:29 pm

I haven't seen those messages but here is someone else who has:
http://groups.yahoo.com/group/dansguardian/message/3915

"ipc" I would assume means "Interprocess Communication" which to me then would mean you have a couple of DansGuardian processes running that can not communicate with each other. The guy who responded to the message I linked above suggested that he shut down the DansGuardian sevice and make sure there are no processes left running and then restart it and see if the errors continue. The thread just stopped so there is no way of telling if that solved the problem or not. I can't find any more useful info on the subject. If it's a problem I can look through the source code for you and figure out what is going on in the section of code where that error message would be issued.

agent007
administrator
administrator
Posts: 254
Joined: Wed Feb 12, 2003 11:26 pm

Post by agent007 » Thu May 01, 2003 3:29 am

VoidMain,

Is it possible to configure Ad-Zapper so as NOT to display the substituted images for ad's...? Am referring to the images it calls from http://adzapper.sourceforge.net/zaps I would prefer blank space instead of the "AD-ZAPPED" image.

thanks,
007

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu May 01, 2003 5:35 am

Most definitely. I use my own custom images but you can just as easily change them to a blank image (maybe even of just a single pixel, don't remember if they have to be a certain size, don't believe so):

http://adzapper.sourceforge.net/#different

I put my images on a local web server in my house and then set the ZAP_BASE variable to the local url where my images are. I used to initialize my image variables in my /etc/init.d/squid startup script in the "start" section right before squid is actually started (which is a fine place to do it). You can also do it in other places (like the "wrapzap" script if you are using it).

agent007
administrator
administrator
Posts: 254
Joined: Wed Feb 12, 2003 11:26 pm

Post by agent007 » Thu May 01, 2003 1:17 pm

hmmm....So i created my own images and added them in the '/etc/squid/zaps' folder and then changed the default URL in the zapper file to point to '/etc/squid/zaps' Did'nt work. Wish there was a way NOT to make zapper use substitute images at all. In any case those ads are not being loaded into the browser, so why at all substitute them with images? I'd prefer blank placeholders....

007

Post Reply