OPNsense Forum

English Forums => Development and Code Review => Topic started by: alectrocute on August 25, 2018, 10:04:06 am

Title: Introducing UnboundBL, a Unbound DNS-based adblocker for OPNsense!
Post by: alectrocute on August 25, 2018, 10:04:06 am
Hey guys,

I'm a total newbie here. I've been using OPNsense for six months now and love it; thought I'd give back by beginning development on OPNblock! It's a package which generates a configuration file for Unbound DNS, converting unlimited, external URL host-file blacklists! It also includes a regex-based whitelist.

(https://camo.githubusercontent.com/c9495eca49026ff8a9b75419de7a87668c83c819/68747470733a2f2f692e696d6775722e636f6d2f7a764b7050446b2e706e67)

Please check it out, give it a spin on your development (or if you're daring, production) machine and let me know what you think!

https://github.com/alectrocute/UnboundBL

There's a lot of development to do and I plan on doing it. I literally just started and finished this today, so give me a few more weeks, hehe. The plan is to make it above and beyond pfBlocker, with an NGINX-based SSL pixel server, statistics, cron-job manager, easy list management and more. In its current state, it's super barebones.

Thanks, OPNsense community!
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: alectrocute on August 25, 2018, 10:04:22 am
Reserving this post for future changelog.
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: alectrocute on August 25, 2018, 10:59:39 am
I'm getting strange kernel panics, related to it not showing up on the menu (sometimes?)

If anybody can help critique the code and get it up to par, that would be great. Thank you!
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: marjohn56 on August 25, 2018, 12:45:16 pm
Interesting... installed it but all I get when reloading the lists is 'something went wrong'. I've used the same github.com entry for whitelist and for blacklist - https://hosts-file.net/ad_servers.txt, I have also added the unbound entry.


Heavy night last night so guidance is probably needed at this point. :)
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: mimugmail on August 25, 2018, 01:37:24 pm
Perhaps you better add a PR with WIP in subject. PR is was easier to review :)
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: alectrocute on August 25, 2018, 06:34:12 pm
Interesting... installed it but all I get when reloading the lists is 'something went wrong'. I've used the same github.com entry for whitelist and for blacklist - https://hosts-file.net/ad_servers.txt, I have also added the unbound entry.


Heavy night last night so guidance is probably needed at this point. :)

Hmm. Let me check that out. There's obviously more work to be done. :)
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: alectrocute on August 25, 2018, 06:34:49 pm
Perhaps you better add a PR with WIP in subject. PR is was easier to review :)

On github's opnsense/plugins repo?
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: marjohn56 on August 25, 2018, 06:50:41 pm
Perhaps you better add a PR with WIP in subject. PR is was easier to review :)

On github's opnsense/plugins repo?


Yes, does not need to be perfect just PR it to there and we can rip it to pieces with greater ease.  :)


Only joking, looks nice, but will be easier to play with if there's a PR.
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: youngman on August 26, 2018, 03:01:23 am
Looking forward to where this (& mimugmail's Bind plugin) might lead to!

At present I use a cron job, along with the method described here to load my DNS blacklists: https://forum.opnsense.org/index.php?topic=6734.0 & https://devinstechblog.com/block-ads-with-dns-in-opnsense/. Would be really nice to eventually transition to a nice gui interface!

Keep up the good work guys!



Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: alectrocute on August 27, 2018, 06:07:35 pm
Hey fellas,

I've created a PR here. Please rip it apart, for the greater good! It includes some possibly breaking-changes.

https://github.com/opnsense/plugins/pull/808

Thanks!
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: marjohn56 on August 27, 2018, 06:09:20 pm
Thanks Alec, will look at it soon.
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: SuperDOS on September 22, 2018, 10:08:02 am
Nice work! been waiting for a proper adblock plugin for opnsense :D

Any thoughts of using pixelserv? https://github.com/kvic-z/pixelserv-tls  (https://github.com/kvic-z/pixelserv-tls)
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: mimugmail on September 22, 2018, 12:19:37 pm
You can also use Bind plugin
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: fabian on September 22, 2018, 01:59:25 pm
I think this can be done using the nginx plugin and some DNS manipulations.
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: kvic on March 02, 2019, 03:38:25 pm
Hi,

What's the current status of this project?
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: mimugmail on March 02, 2019, 04:55:39 pm
Response from maintainer is a bit slow
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: kvic on March 03, 2019, 08:20:11 am
Why is it so? Is it because of lacking time and user responses or running into some technical hurdle?

It seems that there is non-trivial user interest in having a Unbound based ad/tracker/malware blocking solution!

Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: franco on March 05, 2019, 07:26:49 pm
Support your local devs, gently remind them of the work that needs to be done <3
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: alectrocute on March 13, 2019, 01:30:27 am
Hey!

Yeah, I agree. He is a bit slow. ;)

I've made a PR on github with the latest. Should be ready, if not almost ready, for production!
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: alectrocute on March 13, 2019, 01:32:02 am
Why is it so? Is it because of lacking time and user responses or running into some technical hurdle?

It seems that there is non-trivial user interest in having a Unbound based ad/tracker/malware blocking solution!

Working two jobs at the moment, it was simply a problem of time. :(
Title: Re: Introducing UnboundBL, a Unbound DNS-based adblocker for OPNsense!
Post by: Mks on March 16, 2019, 04:43:31 pm
Hi,

Thanks great work.
Is it planned to release it as official opnsense plugin soon?


Thanks
br
Title: Re: Introducing OPNblock, a Unbound DNS-based adblocker for OPNsense!
Post by: kvic on March 21, 2019, 06:12:32 am

Working two jobs at the moment, it was simply a problem of time. :(

Apparently work and life is more important!

Good to hear back from you. Do you have plan to integrate pixelserv-tls?

I'm also working on a module for Unbound that will make adblock more flexible and efficient on blocking and resources.
Title: Re: Introducing UnboundBL, a Unbound DNS-based adblocker for OPNsense!
Post by: Charles2019 on April 13, 2019, 12:30:29 am
Looks and sounds like a nice plugin!  Looking forward to when it is in the official repo!
Title: Re: Introducing UnboundBL, a Unbound DNS-based adblocker for OPNsense!
Post by: Nekromantik on June 30, 2019, 12:30:43 am
hope to see this soon
Title: Re: Introducing UnboundBL, a Unbound DNS-based adblocker for OPNsense!
Post by: fabian on June 30, 2019, 10:41:54 am
very likely dead but you have an alternative in bind and the other dns plugin