Credit goes to oznu that set this up here: https://github.com/oznu/dns-zone-blacklist
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 117,700 down to 61,958.
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 |
The blocklist can be generated using Node.js 8.4.0 or later.
Install:
git clone https://github.com/scottmuc/dns-zone-blocklist.git
cd dns-zone-blocklist
npm install
Then build:
node build.js
The compiled blocklist files will be saved to the ./bind
, ./dnsmasq
and ./unbound
a directories in the root of the project.
Custom entries can be added to the custom.blocklist.json file in the root of this project before building.
Any domains you wish to exclude from the blocklist can be added to the custom.allowlist.json file in the root of this project before building.