OPNsense Forum

English Forums => General Discussion => Topic started by: Jack V on April 29, 2017, 12:46:12 pm

Title: Adblock with dnsmasq/yoyo anybody?
Post by: Jack V on April 29, 2017, 12:46:12 pm
Hi all,

I want to try to setup a simpel DNS adblock for my clients in my network with yoyo.org and dnsmasq. I have a running working configuration on Debian with dnsmasq but I have no clue how to do this with OPNsense.

I don't want to go the web proxy way, I want to block ad networks on the DNS level where it should be blocked.

Is there away to achieve this on OPNsense? It would be nice to let OPNsense handle this task.
Title: Re: Adblock with dnsmasq/yoyo anybody?
Post by: fabian on April 29, 2017, 08:42:26 pm
I don't know if there is a tutorial but for the DNS resolver there does one exist (non official):
https://devinstechblog.com/block-ads-with-dns-in-opnsense/
Note that I had to convert the line endings with dos2unix to make the script working on my device.

Kind regards

Fabian
Title: Re: Adblock with dnsmasq/yoyo anybody?
Post by: Jack V on April 30, 2017, 11:33:37 am
Hi Fabian,

Thanks! 8)

I got it working on OPNsense 17.1.5.

Will this stick between the upgrades?
Title: Re: Adblock with dnsmasq/yoyo anybody?
Post by: fabian on April 30, 2017, 12:58:40 pm
Maybe - if /var is not a tmpfs it does.
Title: Re: Adblock with dnsmasq/yoyo anybody?
Post by: csmall on April 30, 2017, 05:21:45 pm
Hi Fabian,

Thanks! 8)

I got it working on OPNsense 17.1.5.

Will this stick between the upgrades?

How did this work out for you? Is it doing a good job at blocking ads? Does it block YouTube video ads?
Title: Re: Adblock with dnsmasq/yoyo anybody?
Post by: fabian on April 30, 2017, 06:38:34 pm
I had issues with unbound on my hardware so I had to disable it. I am blocking via Proxy (works well) and via Firefox add on (ublock origin). I know that DNS based blocking is also good for apps on Android.
Title: Re: Adblock with dnsmasq/yoyo anybody?
Post by: Jack V on May 01, 2017, 02:19:47 pm
What kind of hardware issues where you having? Just curious.

It works great for blocking ads on Android and what not.

YouTube ads still come in Csmall, but anything else gets blocked. Probably its just (hopefully) adding a ad host of YouTube to the blocked list. If that doesn't work anymore then Google has found new ways to irritate there YouTube clients :(
Title: Re: Adblock with dnsmasq/yoyo anybody?
Post by: fabian on May 01, 2017, 04:57:23 pm
It is strange: unbound crashes on my box due boot and maybe on interface state changes (up/down) - not a problem people usually have. It is an apu1 board.