Nov 17

Network-wide Adblock: Easylist for SquidGuard

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;

This post has been viewed 4237 times.

2 Responses to “Network-wide Adblock: Easylist for SquidGuard”

  1. Alan Says:

    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

  2. Joe Says:

    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

Leave a Reply