Git Product home page Git Product logo

unboundbl's Introduction

UnboundBL ๐Ÿ›‘ contributions welcome

Block ads, malware, tracking, mining + more on OPNsense with UnboundBL & Unbound DNS.

UnboundBL

UnboundBL goes hand-in-hand with Unbound DNS to blackhole undesired content. By generating a .conf file for Unbound in realtime, it allows you to easily submit, convert & manage blacklist URL's. It's not quite at the pfBlocker level, but it's getting there! ๐Ÿ˜…

Current Features

  • Add, download and parse blocklist URLs.
  • Add unlimited whitelist entries in domain format (eg. www.malware-server.net) which will be ignored from any blocklist you parse.
  • One-click refresh and rebuild.

Planned Features

  • Cron-job management.
  • Advanced error reporting.
  • Preset blacklists for easy setup.
  • Advanced blacklist management.
  • Regex builder for whitelist.
  • Pixelserv (NGINX) to replace 0.0.0.0.

Installing

Obviously, this is all done with the 8) Shell mode via SSH.

  1. Drop the UnboundBL/ folder somewhere handy on your router.
  2. Make sure you have the proper tools installed.
  3. cd into UnboundBL/ folder.
  4. $ make package
  5. $ pkg add work/pkg/*.txz

Removing

8) Shell mode via SSH, or web-based package manager, I suppose.

$ pkg remove os-UnboundBL-devel-1.0

Currently at version: devel-1.0 on March 12, 2019

Special thanks to Devin Ortner for his awesome blog post, which helped kickstart this project. OPNsense contributor @mimugmail for his awesome critique and help. And of course, the Unbound DNS & OPNsense team. You guys are 'da real MVPs.

unboundbl's People

Contributors

alectrocute avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unboundbl's Issues

Cache Loss

dnsbl cache never stays for more than an hour or two. I am not using register dhcp setting inside Unbound, Unbound is also not restarting. I checked the logs and couldnt find anything useful. The dnsbl cache only uses 50% of my ram so I have plenty of free memory left.

No /var/unbound/dnsbl.conf created

Thanks for creating this plugin, it looks great!

However, I can't get it to work. I installed it like this:

opnsense-code tools plugins
cd /usr/plugins/dns
git clone https://github.com/alectrocute/UnboundBL.git
cd UnboundBL
make package
pkg add work/pkg/*.txz

I can then find the configuration page in Services / Unbound DNS / DNSBL. However, when I add a blocklist url like the https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts in your example, enable the plugin and then click Save, nothing happens. There's no output in the console section like in your screenshot, the Total domains on blocklist stays empty, and there's no /var/unbound/dnsbl.conf created. The same happens with other blocklist URLs.

Is there a log file or another way to look at what's happening under the hood? There's nothing shown in /var/log/system.log.

File not found

Hello, I got chmod error file not found for this chmod 755 /usr/local/opnsense/scripts/OPNsense/UnboundBL/data.sh, where does data.sh come from?

Blocklist and whitelist fields empty

Running into an issue with the two fields above where they show up blank on page load. They are definitely there but look to be hidden in the page load. Has anyone else ran into this issue or have a fix? I'm assuming this plugin is abandoned?

Unbound wont start with dnsbl.conf included

Hi friend,

Thanks for the tool.

It looks nice, but the installation guide should be edited to foolproof it. I had to walk thru some issues that have already been solved. These issues should either be mentioned in the Readme or edited in the code.

Heres my problem:

After successfully managing to get the Plugin working, unbound refuses to start. In the Log I can see the following:

2020-07-22T07:32:25	unbound: daemonize unbound dhcpd watcher.
2020-07-22T07:31:49	unbound: [99084:0] fatal error: Could not set up local zones
2020-07-22T07:31:49	unbound: [99084:0] error: local-data in redirect zone must reside at top of zone, not at gorillanation.us.intellitxt.com A 0.0.0.0
2020-07-22T07:31:14	unbound: daemonize unbound dhcpd watcher.
2020-07-22T07:24:15	unbound: [31236:0] fatal error: Could not set up local zones
2020-07-22T07:24:15	unbound: [31236:0] error: local-data in redirect zone must reside at top of zone, not at gorillanation.us.intellitxt.com A 0.0.0.0
2020-07-22T07:23:39	unbound: daemonize unbound dhcpd watcher.
2020-07-22T07:23:38	unbound: [60345:0] info: 8.000000 16.000000 1

I used these lists:

image

The file from /var/... is causing an error, if I try to add it, but thats no problem...

Request/HouseCleaning/Suggestions

Hi.

I love what this plugin is going to be with a little time! :) . Thanks for your efforts!!!

Since I'm certainly not a coder, I can only give back with some QA findings and provide suggestions that could help other end-users like me.

  1. With all the different blocklists available for all sorts of apps, I think it should be noted how the only usable blocklists for UnboundBL seem to be the standard "host file" format (0.0.0.0 some.domain.foo) . If you try and add any other type of blocklist, you can't restart the dns service until the bad list is removed.

  2. Keeping the above in mind, a few links to some of the free blocklists would be nice to see on at least this github repo, but maybe even on the OPNsense GUI too just for ease of use.

  3. Add a link/shortcut button on the plugin page to restart the DNS service after a change is made to the DNSBL.

Again, not meaning to step on any toes. I'm just trying to help :)

Update

Hi,

Was very excited when you first announced it. Was wondering if you had abandoned the project or if it's still being developed?

Really hoping for the latter :)

Error Generating Metadata - actions.d

I'm getting the following error when trying to run make package:

"Generating metadata for os-UnboundBL-devel-1.0...cat: /home/UnboundBL/../../Templates/actions.d: No such file or directory"

Some blacklisted dns names are working...

Hi

I don't know why, but some dns names in the lists are working, also if they are on blacklists.

I added the following blacklists:

https://raw.githubusercontent.com/stevenblack/hosts/master/alternates/fakenews-gambling-porn/hosts
https://adaway.org/hosts.txt
http://someonewhocares.org/hosts/hosts
http://hosts-file.net/ad_servers.txt
http://sysctl.org/cameleon/hosts
https://isc.sans.edu/feeds/suspiciousdomains_Low.txt
https://mirror1.malwaredomains.com/files/immortal_domains.txt
https://hosts-file.net/fsa.txt
https://gist.githubusercontent.com/BBcan177/b6df57cef74e28d90acf1eec93d62d3b/raw/f0996cf5248657ada2adb396f3636be8716b99eb/MS-4
http://zerodot1.gitlab.io/coinblockerlists/list_browser.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://isc.sans.edu/feeds/suspiciousdomains_Low.txt
https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt

This results on 299,251 blacklist entries. After that I restarted unbound server.

When I now select some domains from one of the lists above they can be resolved :(

Edit: One thing I just realized... the plugin does change the URLs to lower-case... this is a problem for URLs like https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt or https://isc.sans.edu/feeds/suspiciousdomains_Low.txt which are only working with upper-case letters.

Confused installation for beginners

I can't understand where to start to install the plugin, the exact paths where I should do it and what to do, for example.

Could someone detail it for me, please?

OPNsense 19.7.4_1-amd64
FreeBSD 11.2-RELEASE-p14-HBSD
OpenSSL 1.0.2s 28 May 2019

'make package' fails

`make package

Generating metadata for os-UnboundBL-devel-1.0...cat: /usr/plugins/UnboundBL/../../Templates/actions.d: No such file or directory
*** Error code 1

Stop.
make[2]: stopped in /usr/plugins/UnboundBL
*** Error code 1

Stop.
make[1]: stopped in /usr/plugins/UnboundBL
*** Error code 1

Stop.
`

Naming issue

Hi, POST-INSTALL script failed because of upper/lowercase issue, hope you can fix this.

Script looking for UnboundBL, but folder on UnboundBL/src/opnsense/scripts/OPNsense/ is Unboundbl

curl wont download from github

Hello,
curl is cant download from github

[Starting DNSBL update]
[Cleaning up old files]

# Overview
 ^ Whitelist entries:
 
 ^ Blocklist URLs to fetch:
 https://www.malwaredomainlist.com/hostslist/hosts.txt https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0 https://zerodot1.gitlab.io/coinblockerlists/hosts_browser https://raw.githubusercontent.com/adaway/adaway.github.io/master/hosts.txt https://raw.githubusercontent.com/stevenblack/hosts/master/data/stevenblack/hosts https://someonewhocares.org/hosts/zero/hosts https://raw.githubusercontent.com/fademind/hosts.extras/master/uncheckyads/hosts https://raw.githubusercontent.com/fademind/hosts.extras/master/add.spam/hosts https://raw.githubusercontent.com/azet12/kadhosts/master/kadhosts.txt

[Done creating new temporary files]

# Downloading external blocklists...
   Attempting to download https://www.malwaredomainlist.com/hostslist/hosts.txt (via curl).
 ^ Downloaded https://www.malwaredomainlist.com/h... successfully.
   Attempting to download https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0 (via curl).
 ^ Downloaded https://pgl.yoyo.org/adservers/serv... successfully.
   Attempting to download https://zerodot1.gitlab.io/coinblockerlists/hosts_browser (via curl).
 * Error trying to download https://zerodot1.gitlab.io/coinbloc...
   Attempting to download https://raw.githubusercontent.com/adaway/adaway.github.io/master/hosts.txt (via curl).
 ^ Downloaded https://raw.githubusercontent.com/a... successfully.
   Attempting to download https://raw.githubusercontent.com/stevenblack/hosts/master/data/stevenblack/hosts (via curl).
 * Error trying to download https://raw.githubusercontent.com/s...
   Attempting to download https://someonewhocares.org/hosts/zero/hosts (via curl).
 ^ Downloaded https://someonewhocares.org/hosts/z... successfully.
   Attempting to download https://raw.githubusercontent.com/fademind/hosts.extras/master/uncheckyads/hosts (via curl).
 * Error trying to download https://raw.githubusercontent.com/f...
   Attempting to download https://raw.githubusercontent.com/fademind/hosts.extras/master/add.spam/hosts (via curl).
 * Error trying to download https://raw.githubusercontent.com/f...
   Attempting to download https://raw.githubusercontent.com/azet12/kadhosts/master/kadhosts.txt (via curl).
 * Error trying to download https://raw.githubusercontent.com/a...

[Done downloading external blocklist URLs]
 ^ 5 blocklist fetches failed.
 ^ 4 blocklist(s) will be parsed...

[Done parsing master blocklist]

 --------- Stats --------
 Domains currently being blocked: 18053 
 Sources: 4
 Failed sources: 5
 ------------------------

[Cleaning up]
+ DNSBL update complete! Please restart your DNS resolver.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.