Skip to content

About

Generate DNS blocklists (Pi-hole, AdGuard, dnsmasq, Unbound, hosts, RPZ) against disinformation, propaganda, tracking, scams & malware. 11 categories, 1,600+ domains updated weekly, 6 languages. No tracking by default, no dependencies, works offline.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

81 Commits

Folders and files

Repository files navigation

πŸ›‘οΈ DNS Blocklist Builder

Generate DNS blocklists against disinformation, state propaganda and conspiracy sites, and against trackers, scams and malware. No tracking by default (anonymous usage stats only if you switch them on). No dependencies. Works offline.

Live: https://danielenki420.github.io/dns-blocklist-builder/


Features

  • 11 categories – eight curated by hand (Russian propaganda, Epoch Times/Falun Gong, Far-right DACH, Far-right International, Conspiracy theories, Anti-vax, Chinese state media, Climate denial) and three filled from public lists (Ad tracking & data brokers, Investment fraud & crypto scams, Malware & adware)
  • 6 formats – dnsmasq, hosts file, Pi-hole, AdGuard Home, Unbound, RPZ Zone
  • 6 languages – DE, EN, IT, ES, FR, PT
  • 4 profiles – Security Core, Privacy & Security, Editorial Filter, Complete Protection (ready-made files in lists/profiles/)
  • More than 2,000 domains: phishing updated every 6 hours, malware daily, tracking weekly; every release passes an automatic quality gate first
  • Zero dependencies – pure HTML/CSS/JS, works offline
  • Open Source – MIT License, contributions welcome

Usage

Option A: Use online

Go to https://danielenki420.github.io/dns-blocklist-builder/

Option B: Download and run locally

git clone https://github.com/DanielEnki420/dns-blocklist-builder
# Open index.html in your browser – no server needed

Raspberry Pi 5 Quickstart

One command installs everything: clones the repo, checks the published lists, configures Pi-hole, and sets up automatic updates every 6 hours.

curl -fsSL https://raw.githubusercontent.com/DanielEnki420/dns-blocklist-builder/main/setup-pi5.sh | sudo bash

What it does:

  1. Installs git, flock and Node.js 24 LTS if needed (an installed Node.js 22 or newer is kept)
  2. Clones the repo to /opt/dns-blocklist-builder
  3. Checks the lists with the quality gate and keeps them as the first rollback snapshot
  4. Adds the blocklist to Pi-hole and updates gravity: Pi-hole installed on the host gets the local file, Pi-hole in a Docker container (named pihole, see PIHOLE_CONTAINER) gets the published list by URL
  5. Installs cron jobs (/etc/cron.d/dns-blocklist-builder): data update every 6 hours, a weekly check for new software (reports only), an hourly DNS functional test
  6. With Telegram set up: a message when the lists change or an update fails, and a bot (dns-blocklist-bot) that runs as its own unprivileged user

Data and software are updated separately. The data update (update-pi5.sh β†’ scripts/update-data.sh) takes only the published lists/ from GitHub, never new code; it runs under a lock (flock), checks the lists with the quality gate, keeps the previous ones if the check fails, and saves the last 10 good versions in /var/lib/dns-blocklist/lkg. New code runs as root, so it is never pulled in automatically: the weekly check only tells you, and you apply it yourself:

sudo /opt/dns-blocklist-builder/scripts/update-software.sh --apply

Back to an earlier version of the lists (the newest snapshot, or --to ID; --list shows them):

sudo node /opt/dns-blocklist-builder/scripts/rollback.js --lkg /var/lib/dns-blocklist/lkg --lists /opt/dns-blocklist-builder/lists --no-db

Pi-hole in Docker subscribes to the list on GitHub by URL; for it, the quality gate in the GitHub workflow is the protection, and a rollback on the Pi does not change what gravity downloads. A rollback of the published lists is a revert on main plus a config/hold.json that stops the scheduled updates until the cause is fixed: see docs/ROLLBACK.md.

Prerequisites: Raspberry Pi OS (or any Debian/Ubuntu system), Pi-hole already installed (on the host or in Docker).

Options (set as env vars before piping to bash):

Variable Default Description
INSTALL_DIR /opt/dns-blocklist-builder Where to clone the repo
CRON_SCHEDULE 20 */6 * * * Cron schedule for the data update
SOFTWARE_CHECK 0 4 * * 1 Cron schedule for the software check (reports only)
STATE_DIR /var/lib/dns-blocklist State, quality gate report, rollback snapshots
METRICS_FILE (unset) Prometheus textfile for node_exporter, e.g. /var/lib/node_exporter/textfile/dns_blocklist.prom
DNS_TEST_SERVER 127.0.0.1 Resolver the hourly DNS functional test asks
DNS_TEST_PROFILE (unset) Profile your Pi-hole subscribes to (e.g. security-core); the DNS test then samples that profile. Set it in /etc/default/dns-blocklist-builder
DNS_TEST_REFERENCE 1.1.1.1 Resolver that proves a sample still exists before it counts as blocked (none turns the check off). Set it in /etc/default/dns-blocklist-builder
SKIP_PIHOLE 0 Set to 1 to skip Pi-hole integration
SKIP_CRON 0 Set to 1 to skip cron job installation
PIHOLE_CONTAINER pihole Name of your Pi-hole Docker container
TELEGRAM_BOT_TOKEN (unset) Telegram bot token for update notifications
TELEGRAM_CHAT_ID (unset) Telegram chat/user ID

When an update changes the lists you get a Telegram message like:

πŸ›‘ Blocklist updated
βž• +100 domains added
πŸ“Š Total: 1003 domains
πŸ“… 2026-11-16 03:00 UTC
βœ… Pi-hole gravity refreshed

If an update fails, the message says πŸ”΄ Blocklist update failed, with the exit code and the line; if the quality gate refuses the new lists, πŸ”΄ Blocklist update rejected. In both cases the previous lists stay active.

The Telegram bot answers /status, /stats, /update and /help. It runs as the user dnsbl-bot without any privileges: /update only drops a request file, and a systemd path unit starts the update service (see ops/systemd/).

Monitoring: with METRICS_FILE set, every update and DNS test writes Prometheus metrics (scripts/metrics.js). A Perses dashboard and alert rules are in ops/perses/ and ops/prometheus/. The DNS functional test (scripts/dns-functional-test.js) asks the resolver for A and AAAA: listed domains must be blocked, controls and protected hosts (GitHub, Debian mirrors, public resolvers) must resolve. A sample counts only if a reference resolver still resolves it, so a domain that has disappeared is skipped instead of passing as "blocked". With a profile, only hand-curated domains and automatic ones older than 14 days are sampled (gravity may lag a week behind). Besides failures and stale data, the alert rules fire when the metrics are missing altogether and when the published lists are older than 3 days although the local update succeeds; CI checks them with promtool and lints the dashboard with percli.

Example β€” with Telegram notifications:

curl -fsSL .../setup-pi5.sh | sudo TELEGRAM_BOT_TOKEN=123:abc TELEGRAM_CHAT_ID=456789 bash

Update manually at any time:

sudo /opt/dns-blocklist-builder/update-pi5.sh

Install on your router

Xiaomi / OpenWrt (dnsmasq)

# Copy the downloaded file to your router (use your router's address)
scp blocklist_*.conf root@ROUTER_IP:/etc/dnsmasq.d/
# Restart dnsmasq
ssh root@ROUTER_IP "/etc/init.d/dnsmasq restart"

Pi-hole

Add this URL as an adlist (Pi-hole 6: Lists; Pi-hole 5: Group Management β†’ Adlists), then update gravity. It always serves the latest list that passed the quality gate:

https://raw.githubusercontent.com/DanielEnki420/dns-blocklist-builder/main/lists/blocklist-all.pihole.txt

Only some categories? Use a profile from lists/profiles/ or the files in lists/by-category/, or pick them in the tool and download the result.

Profile Categories File (Pi-hole format)
Security Core malware, phishing lists/profiles/security-core.pihole.txt
Privacy & Security malware, phishing, tracking lists/profiles/privacy-security.pihole.txt
Editorial Filter the eight hand-curated categories lists/profiles/editorial.pihole.txt
Complete Protection all 11 lists/profiles/complete.pihole.txt (same domains as blocklist-all)

Every profile exists in all six formats.

AdGuard Home

Go to Filters β†’ DNS blocklists β†’ Add blocklist β†’ Add a custom list, with this URL:

https://raw.githubusercontent.com/DanielEnki420/dns-blocklist-builder/main/lists/blocklist-all.adguard.txt

BIND 9 (RPZ)

Save lists/blocklist-all.rpz.txt as /etc/bind/blocklist-all.rpz.txt and add this to named.conf (if you already have an options block, put the response-policy line into it), then run rndc reload:

options {
    response-policy { zone "rpz.blocklist"; };
};
zone "rpz.blocklist" {
    type primary;
    file "/etc/bind/blocklist-all.rpz.txt";
    allow-query { none; };
};

Every listed domain and its subdomains then answer NXDOMAIN. Until 19 November 2026 the RPZ files had no SOA record and absolute names, so BIND could not use them.

/etc/hosts (any system)

# Append to your hosts file ("sudo cat … >> /etc/hosts" fails: the redirect runs without sudo)
cat blocklist_*.txt | sudo tee -a /etc/hosts >/dev/null

Categories

Counts as of 19 November 2026 (the automatic categories have grown since). The current number is in the header of every file in lists/ (# Domains: …) and in lists/manifest.json.

Category Domains Description
πŸ‡·πŸ‡Ί Russian Propaganda 49 RT, Sputnik, TASS, Voice of Europe
πŸ“° Epoch Times / Falun Gong 38 NTD, Epoch Times (all languages), Minghui
πŸ‡©πŸ‡ͺ Far-right DACH 48 Compact, Junge Freiheit, PI-News, AUF1
🌍 Far-right International 48 InfoWars, Breitbart, Daily Stormer
πŸŒ€ Conspiracy Theories 36 NaturalNews, Rense, BeforeItsNews
πŸ’‰ Anti-Vax / Medical Disinfo 31 Impfkritik, Mercola, CHD, NVIC
πŸ‡¨πŸ‡³ Chinese State Media 32 CGTN, Xinhua, China Daily, Global Times
🌑️ Climate Denial 26 EIKE, Heartland, GWPF, Watts Up
πŸ“‘ Ad Tracking & Data Brokers 161 ads and trackers from yoyo.org that Hagezi Multi Light (or Disconnect) also lists; weekly, up to 100 new per run
🎣 Investment Fraud & Crypto Scam 820 from Phishing Army; every 6 hours, up to 25 new per run (see the limits below)
🦠 Malware & Adware Distributors 314 URLhaus hosts that are online (via malware-filter), confirmed by Hagezi's threat feeds; daily, up to 100 new per run

The eight editorial categories are curated by hand. The last three are filled automatically: a domain must appear in at least two sources of its category before it is added (where the category has two or more). For tracking the second source is a filter more than an independent check: Hagezi uses yoyo.org as one of its inputs and keeps only popular, well-checked domains. A domain the update added expires when its sources have stopped confirming it, both for a number of runs and for a number of days (phishing 8 runs and 7 days, malware 5 runs and 30 days, tracking 4 runs and 28 days, see config/policy.json); a run in which one of the category's sources failed does not count. Domains added by hand never expire. The daily malware run also checks whether automatic domains still exist: only a domain that two public resolvers (1.1.1.1, 8.8.8.8) answered with NXDOMAIN on three runs at least 12 hours apart is dropped, at most 5 % per run; a timeout or SERVFAIL never counts.

What the automatic categories do not do. The phishing category takes at most 25 new domains per run out of a source with well over 100,000 entries, chosen by a fixed hash (spread evenly, not by age or risk). GitHub runs the scheduled update when it has capacity, in practice about once a day, so it adds roughly 25 domains a day. It is a sample, not phishing protection; for that, subscribe to a dedicated feed (for example HaGeZi's Threat Intelligence Feeds) next to these lists. The category name describes the intent ("investment fraud & crypto scam"); the source is a general phishing list.

Where the data lives and how a release is checked

Every domain is a record in data/domains.json: category, whether it was added by hand or by the update, its sources (name, URL, when seen), reason, first and last seen, last reviewed, and confidence. Domains that existed before 30 November 2026 carry no sources or reason (none were recorded then) and the confidence unreviewed; nothing was filled in after the fact. index.html gets its data from this file (scripts/build-web.js).

scripts/publish.js builds all files and runs the quality gate (lib/gate.js) before anything is published. It reads every file back and checks: the sha256 sums in lists/manifest.json; the syntax of each format; no domain twice; the same domains in all six combined formats, in every category and every profile; valid names only; no public suffix (Public Suffix List), whole hosting platform (github.io, blogspot.com, …) or protected host (config/protected-platforms.json); the RPZ zone loads in BIND; and the change against the previous release: the size (at least 70 %, at most +50 %) and the domains themselves, per category: at most max_new_per_run new and at most half removed (gate.max_removed_fraction_per_category, a category may set its own max_removed_fraction). A feed that swaps its content while keeping its size is caught this way. The report lists added and removed domains per category. The result is in lists/quality-report.json. A refused release is not published and the workflow turns red.

If a source fails or suddenly delivers almost nothing, the update still builds the lists from the others, and the run is marked as failed so it gets fixed. Until 19 November 2026 this went unnoticed: the Hagezi tracking list had moved (August 2026), URLhaus ended its free host file (October 2026) and the Disconnect malware list had shrunk to a single test domain, so tracking and malware got almost no new domains.

Suggest a domain or category

Found a missing domain? β†’ Open a GitHub Issue

Want a new category? β†’ Open a GitHub Issue

A legitimate site is blocked? β†’ Open a GitHub Issue titled [remove] example.com and say what breaks. In the automatic categories (tracking, malware, phishing) the domain goes into allowlist.txt: the lists are rebuilt within minutes, and the public sources cannot bring it back. Domains in the hand-curated categories are removed by hand.

Something does not work? β†’ Open a GitHub Issue

Contributing

See CONTRIBUTING.md. In short: domains are added in data/domains.json (not in index.html), then

node scripts/publish.js     # builds lists/ and index.html, runs the quality gate
node --test tests/*.js      # all tests
bash tests/test-setup-pi5.sh

Note on editorial choices

This tool reflects a specific editorial stance: blocking sites that systematically spread disinformation, state propaganda, or scientifically discredited content. It is not intended to block all conservative or alternative media – only sources with a demonstrated history of deliberate disinformation.

If you disagree with a categorization, please open an Issue to discuss.

License

The code, the web tool and the eight hand-curated categories: MIT Β© Daniel Enki.

The MIT license does not cover the three automatic categories (tracking, malware, phishing). They are selected from the public lists below: a domain is included only if it is in the first source and, for tracking and malware, also in a second source that serves only as a filter. Single domain names are facts, but the source lists may be protected as collections. If you redistribute these categories (the files in lists/, the automatic categories in index.html or in data/domains.json), check the terms below. None of these maintainers endorse this project. Every file in lists/ says in its header which license applies to it.

Source Category Terms
Peter Lowe's Ad & Tracking List tracking no formal license; the site says "Feel free to combine this list with yours or lists from other sites" and to put the result on the web
Disconnect.me Tracking tracking (filter only) GPL-3.0, stated in the list
Hagezi Multi Light tracking (filter only) GPL-3.0
malware-filter (URLhaus) malware CC0 and MIT; the URLhaus data is CC0
Hagezi Threat Intelligence Feeds (mini) malware (filter only) GPL-3.0
Phishing Army Blocklist phishing no extra restrictions of its own; the terms of its upstream sources (PhishTank, OpenPhish, CERT.PL and others) apply, see usage and licensing

Checked on 19 November 2026. Terms can change; the linked pages are what counts. Thanks to everyone who maintains these lists: without them there would be no automatic categories.

About

Generate DNS blocklists (Pi-hole, AdGuard, dnsmasq, Unbound, hosts, RPZ) against disinformation, propaganda, tracking, scams & malware. 11 categories, 1,600+ domains updated weekly, 6 languages. No tracking by default, no dependencies, works offline.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages