home-dns-adblock is a dnsmasq-based home DNS ad-blocking setup that blackholes Hongguo and Tomato Novel ad domains with 218 exact rules, no root or certificates needed, still working on the go via Tailscale.
- v1.2.0
- Published at
- 5d ago
- 66
- Stars
- 51
- Download
- Synced at
- 4d ago
Latest release
v1.2.0Oct 14, 2026, 05:14 PMDownloads slow? Switch the source anytime above
README
Project Overview
home-dns-adblock is a home-network DNS-level ad-blocking setup: dnsmasq answers ad domains of Chinese free-content apps (Hongguo short dramas, Tomato Novel) with 0.0.0.0. No root, no certificates, no app modification — point devices' DNS at one always-on host, and keep blocking on the go through a Tailscale tunnel.
218 exact-domain rules, zero false positives, one host protecting the whole family.
Key Features
- DNS blackholing: ad domains resolve to
0.0.0.0so ads fail to load and get skipped - Exact-domain rules: 218 precise rules with whitelist protection for main content, no keyword rules
- Works on the go: Tailscale routes 4G and remote Wi-Fi DNS back home through an encrypted tunnel
- Multi-format lists:
dist/ships AdGuard, hosts, Clash, Surge and Quantumult X subscriptions - Ad-domain discovery:
adblock-helper.shmines DNS logs by timestamp to pinpoint new ad domains - Rule generator:
gen_rules.pymerges community rule sets with manual additions - One-shot deploy:
install.shplusverify.shself-check - Full query logs: watch what each device resolves and what got blocked
Target Audience
- Users annoyed by Hongguo/Tomato ads
- Self-hosters with an always-on Linux box
- Families wanting zero-config protection
- Users who only want to subscribe to the lists
Quick Start
- Prepare an always-on Linux host with a fixed LAN IP
- Install dnsmasq and copy
config/files into/etc/dnsmasq-adblock/ - Edit
listen-addressand two other marked lines, then start dnsmasq - Point devices or the router's DHCP DNS at the host IP
- For remote use, install Tailscale and enable "Override local DNS"
Core Advantages
- Non-invasive: no root, no profiles, no CA certificates, nothing changes on devices
- Domain-first blocking: ad IPs change daily but domains don't
- Tiny footprint: about 2.5 MB RAM, fine on a Raspberry Pi
- Two ways to use: run your own DNS or just subscribe to ready-made lists
System Requirements
| Item | Requirement |
|---|---|
| Server | Any always-on Linux (Ubuntu/Debian/OpenWrt/Raspberry Pi) |
| Dependencies | dnsmasq; a Tailscale account for remote use |
| License | MIT |
Notes
- Cannot block in-stream live ads sharing the content CDN with the main video
- Cached ads still play, and DoH or system-level VPNs bypass the local DNS
- Test new rules on a single device before enabling them for the whole home
- On iOS keep only this DNS server; unreachable public DNS entries will break connectivity
Release history
Sort