Giter Club home page Giter Club logo

dns-zone-blacklist's Introduction

Travis branch

DNS Zone Blacklist Generator

This project generates a zone file for BIND, Dnsmasq and Unbound DNS servers using data from the StevenBlack/hosts project. The generated zone files can be used to block ads and malware for an entire network when used with a local DNS server.

DNS based ad blockers can support wildcard entries. This tool filters out any subdomains of known adware or malware domains, reducing the number of zone entries required from 82,077 down to 50,115.

DNS Server Response Type Download SHA256 Checksum
BIND 0.0.0.0 link link
BIND (RPZ) NXDOMAIN link link
Dnsmasq 0.0.0.0 link link
Dnsmasq NXDOMAIN link link
Unbound 0.0.0.0 link link
Unbound NXDOMAIN link link

Blacklist Updates

The blacklists are updated every 24 hours with the latest data from StevenBlack/hosts. The builds logs are publicly available on Travis CI and each zone file is tested to be valid before publishing.

Building the Blacklist

The blacklist can be generated using Node.js 8.4.0 or later.

Install:

git clone https://github.com/oznu/dns-zone-blacklist.git
cd dns-zone-blacklist

npm install

Then build:

node build.js

The compiled blacklist files will be saved to the ./bind, ./dnsmasq and ./unbound a directories in the root of the project.

Custom Entries

Custom entries can be added to the custom.blacklist.json file in the root of this project before building.

Whitelist

Any domains you wish to exclude from the blacklist can be added to the custom.whitelist.json file in the root of this project before building.

dns-zone-blacklist's People

Contributors

dependabot[bot] avatar georgmay avatar hashworks avatar oznu 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  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

dns-zone-blacklist's Issues

Please remove az416426.vo.msecnd.net

Hi!
One of the VPNs I use at a partner company is using az416426.vo.msecnd.net in their VPN login process. If this host is blocked, I cannot login to the VPN.

Can you please remove this host from the blacklist?
I believe removing this entry from the list could help others facing similar issues.

[Fork] Together Strong or Seperatly Strong

I forked this project and made some changes to suit my needs. What do you think about merging those big changes, @oznu? I suppose there are different purposes and needs, so no problem to separate and go on from there.

unbound function

The new unbound function allows you to cut the block list in half

Unbound 1.13.1
Fix #397: [Feature request] add new type always_null to local-zone similar to always_nxdomain.

local-zone: "doubleclick.net" always_null

BIND9: Request Policy Zones (RPZs)

To flesh out the nxdomains, we can get an nxdomain for BIND9.10+ with Request Policy Zones, which are meant to serve local dns policy and function more or less as a dns-based firewall.

Essentially:

$ UPSTREAM_HOSTS_FILE='https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts'
$ 
$ ## paths
$ TMP='/tmp'
$ SRC="${TMP}/hostfile.src"
$ TMP_RPZ="${TMP}/rpz"
$ 
$ ## functions
$ build_for_isc_bind() {
>   # build BIND9 RPZ zone file
>   echo '$TTL 3H' | tee ${TMP_RPZ} >/dev/null 2>&1
>   echo '@                       SOA LOCALHOST. blocked (1 1h 15m 30d 2h)' | tee --append ${TMP_RPZ} >/dev/null 2>&1
>   echo '                        NS  LOCALHOST.' | tee --append ${TMP_RPZ} >/dev/null 2>&1
>   echo '' | tee --append ${TMP_RPZ} >/dev/null 2>&1
>   awk '$1 == "0.0.0.0" {print $2, "CNAME", "."}' ${SRC} | grep -vE "^[0-9].*[0-9] CNAME \.$" | tee --append ${TMP_RPZ} >/dev/null 2>&1
> }
$ 
$ curl -Lo ${SRC} ${UPSTREAM_HOSTS_FILE} 2>/dev/null
$ build_for_isc_bind
$ 
$ head ${TMP_RPZ}
$TTL 3H
@                       SOA LOCALHOST. blocked (1 1h 15m 30d 2h)
                        NS  LOCALHOST.

1493361689.rsc.cdn77.org CNAME .
30-day-change.com CNAME .
2468.go2cloud.org CNAME .
adsmws.cloudapp.net CNAME .
androidads23.adcolony.com CNAME .
annualconsumersurvey.com CNAME .
$ 
$ # already run and applied system-wide
$ host 1493361689.rsc.cdn77.org
Host 1493361689.rsc.cdn77.org not found: 3(NXDOMAIN)

lib.rus.ec

The whole domain lib.rus.ec is being blocked. This is domain of the Library Genesis project at http://gen.lib.rus.ec/ which aims at giving free access to scientific research. It is controversial as it violates copyright of large publishers, but otherwise does not publish malware etc so unless this blacklist aims at piracy prevention this one should be whitelisted.

unbound nxdomain file uses incorrect syntax

It seems to me the unbound DNS zone file uses incorrect syntax.

The lines are formed like:
local-zone: "s.sh" static
[...]

where they should be:
local-zone: "s.sh" always_nxdomain
[...]

Could this be fixed please?

Thanks for your very useful work! - Mark

RCODE 5 (REFUSED) as response type

Wouldn't it be better to use RCODE 5 "REFUSED" as response type rather than NXDOMAIN, since we are filtering DNS requests?

e.g. for Unbound:
local-zone: evil.invalid refuse

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.