I was finally annoyed with Ads to the point I blocked them on every single device that accesses the internet through my network. Screw you all, there’s too much, it’s out of control. On the Wii, on the iPhone, in my RSS feeds, punch the monkey, win an xbox… ENOUGH.
With the help of Squid + SquidGuard + Rick752′s EasyList for AdBlock Plus, I broke free from the clutter that is web advertising.
Yes, it’s easy and you can do it. Read on for my scripts.
The process is detailed as lengthy as my ADD will allow me to on my wiki, under the post Network-Wide Adblock.
If you are already familiar enough with Squid and SquidGuard, I have included a .sed file to convert Rick752′s Easylist to be valid regular expressions. Put the resulting file in the squidGuard’s db directory, reference it in a dest block and reload squid. It’s really that simple.
adblock.sed
/@@.*/d;
/^!.*/d;
/^\[.*\]$/d;
s#http://##g;
s,[.?=&/|],\\&,g;
s#*#.*#g;
s,\$.*$,,g;

Justin J. Novack
May 13th, 2008 at 7:50 am
Good tips… We use squid and squidGuard here extensively. I was just going to implement the URL blacklisting, but adblock’s regexs are a much better solution.
Thanks for the tips!
Alan
April 18th, 2009 at 10:29 am
I kept getting a segment fault in ubuntu until i found https://bugs.launchpad.net/ubuntu/+source/squidguard/+bug/316816
/@@.*/d;
/^!.*/d;
/^\[.*\]$/d;
s#http://#^#g;
s,[.?=&/|()[],\\&,g;
s#*#.*#g;
s,\$.*$,,g;
after i used that it worked like a charm! network wide adblock!! doesn’t get much better than that