DD-WRT with integrated Tracker and Adblocking using Privoxy

I have just integrated another feature. Here comes a proxy server with default rules for adblocking and tracking mechanisms like Google Analytics, Facebook Ilike Button…

This does not mean you cannot use Facebook or Google anymore, this just blocks tracking through 3rd party sites.

NOTE: You may have seen scripts that download host lists onto your router in order to redirect hostnames from well known adblocking servers to your routers ip . While this is an effective method to avoid certain ads it is the biggest security hole for your router. You have no control over the external host list, in case it was manipulated you are going to be redirected like a fool, to prepared servers that are just waiting to load you with malware etc.

Thus if you have never heard of privoxy you should start your browser and direct it to http://www.privoxy.org/.


Click to enlarge

The image shows the configuration page which allows to enable privoxy. In standard mode it will just act as a normal proxy that filters ads and other annoying content. In this mode you have to setup each clients browser to use the proxy: <routersip>:<port> e.g. : 8118

In transparent mode all http traffic will be intercepted by the proxy, and every client will connect through the proxy, this is useful if you want to enforce the rules you defined. Lets say for example you want to filter out adult content and don’t want your kids to bypass your filter. The Custom Configuration is needed if you want to place your filter rules on a removable writeable media so you can create your own set of rules. To do this you would just use the standard config located under /tmp/privoxy.conf copy and paste the content and replace the paths to the actionfiles.

Note: In transparent mode the access to the dd-wrt page goes through the proxy, if the proxy dies for whatever reason you cannot reach the routers webif. In this case you can logon to through a shell and disable transparent mode with the command:

nvram set privoxy_transp_enable=0

nvram commit

Then restart the router. This will stop the firewall rule that enforces transparent mode.

Download Broadcom Build (8MB Units 47xx: Netgear WNR3500L, Asus RT-N16, Linksys WRT610N V1/V2):


3 Thoughts on “DD-WRT with integrated Tracker and Adblocking using Privoxy

  1. jon on 11.9.2011 at 05:07 said:

    Can you remake this build with the newest version of privoxy?</p>
    <p>The version it comes with doesn’t seem to filter compressed pages, and I don’t want to completely turn off compression. </p>
    <p>I tried updating privoxy myself but without success, I’m very new at this kind of thing.

    It includes the latest privoxy version, but compression support is currently not compiled in. I can see if I can add the needed libs in order to support compression.

  2. jon on 11.9.2011 at 16:07 said:

    Thanks, I would really appreciate that. I’ll be anxiously waiting to for an updated build!

    Compression support is now included in my latest builds.

  3. jon on 23.9.2011 at 23:27 said:

    <blockquote><p>Hey Ric,</p>
    <p>Privoxy compression works great.</p>
    <p>Now I have another problem, I can not get privoxy transparent mode to work.</p>
    <p>I enable transparent mode in dd-wrt like your screenshot, but my browser still does not use it, unless I manually set the proxy ip in my browser settings.</p>
    <p>I’ve tried restarting the router and setting nvram set privoxy_transp_enable=1, but nothing works.</p>
    <p>The only way privoxy is working is if I set the proxy server in my browser.</p>
    <p>Am I missing something? How do I get transparent mode to work?</p></blockquote>

    I just found a bug where sometimes the iptable rule that is responsible to redirect all traffic through the router gets deleted after privoxy startup has been complete. There will be new builds available soon

Schreibe einen Kommentar

Post Navigation