DNS based adblock using OpenWRT, OpenDNS, and dnsmasq

Why use a DNS based adblock? Because I prefer to try to keep advertisements and pop ups off of all computers that use my internet connection, not just the ones with an ad-blocking browser plugin installed. It also cuts down on bandwidth usage from those auto-play advertising videos and flashing images.

This setup works great using OpenWRT router firmware and dnsmasq for DNS. It was in use on my home router up until recently. I believe that the lists have grown to a size that puts a strain on my aging router hardware so I removed this setup until I get a newer router with more memory.

My particular settings are a mashup of several scripts and resources I found online long ago. Unfortunately I do not have the original sources to provide reference links.

Here is what I used to set it up:

Linksys WRT54G v4 (4MB Flash, 16MB RAM)

OpenWRT Backfire 10.03.1

There are several parts I used to get this setup and automated so that the adblock lists update each morning at 05:00. Also I created an account with OpenDNS so that I can forward and filter DNS queries based off of their lists.

This firewall rule will re-route all DNS traffic to our router so that our DNS setup cannot be bypassed. If someone specifies a different DNS server in their network config, our firewall will gracefully and transparently redirect the request to our DNS setup.

Add a new entry to Redirections that matches the following. Change the destination to the router’s IP, mine is 192.168.15.1

I have an adblocker app called weblock. The app icon is purple with a hand outline. How do I do your configuration in the app so that I can redirect ads to OpenDNS and speed up my connection. I can set up a dummy proxy and set up a custom proxy as well as blacklist and whitelist rules. How should I do this as well as how should I set up the redirect rules.

Yes, much has changed in 2 years. I have a working configuration on the newer OpenWRT and also a newer router that will handle more traffic and more memory for the massive domain list. Most of the configuration stays the same.

Hello. Sorry for bad english. Now, in Openwrt 15 (chaos calmer), ddns configuration is different: Hostname all.dnsomatic.com is not right. could you please… update that config, please??
Thank you very much.