A self-tuning Pi-hole companion that automatically builds lean, region-aware blocklists based on real network behavior.
Tune My Hole analyzes historical DNS traffic from Pi-hole's FTL (Faster Than Light) query database, correlates observed domains with known malicious and tracking sources producing a small, high-confidence local blocklist.
This project favors signal over volume. No list hoarding. No guesswork. Just evidence-based blocking.
- Analyzes historical DNS queries stored in Pi-hole's long-term FTL query database
- Cross-references observed domains against curated malicious, tracking and unwanted domain sources
- Generates an optimized Pi-hole local blocklist designed to complement existing adlists
Instead of blindly blocking millions of domains, this approach produces a small, auditable rule set based on what your network actually resolves. The result is fewer breakages, faster lookups and blocking decisions you can reason about.
The analysis runs entirely offline. Query data never leaves your Pi-hole and blocking decisions remain predictable and transparent.
Tune My Hole is a Pi-hole companion agent that installs once and runs automatically.
- Linux system running Pi-hole
- Read access to FTL query database
systemd(recommended) orcron
Download the binary matching your system from the Releases:
sudo curl -L https://github.com/0x48piraj/tune-my-hole/releases/download/v0.1.0/tmhole-aarch64-unknown-linux-gnu -o /usr/local/bin/tmhole
sudo chmod +x /usr/local/bin/tmholeNote: Replace the target with
tmhole-armv7-unknown-linux-gnueabihffor 32-bit Raspberry Pi OS.
Run once:
sudo tmhole initThis will:
- Create
/etc/pihole/tune-my-hole.d/ - Install a daily systemd timer (or cron fallback)
- Create managed state and output files
Tune My Hole now runs automatically.
Tune My Hole consumes one or more Pi-hole compatible domain blocklists.
Reference lists live in:
/etc/pihole/tune-my-hole.d/
Example (using AdguardDNS blocklist):
sudo curl -sSL https://v.firebog.net/hosts/AdguardDNS.txt -o /etc/pihole/tune-my-hole.d/AdguardDNS.txtYou can add multiple lists. Tune My Hole will combine them automatically.
Reference lists are inputs only and are never modified.
You normally don't need this, but you can run it manually:
sudo tmhole runThis will:
- Analyze Pi-hole DNS history
- Generate a lean, managed blocklist
- Reload Pi-hole DNS (if enabled)
Check what Tune My Hole has done:
sudo tmhole statusExample output:
Tune My Hole
────────────────────────
Managed domains: 4,832
Last run: 2026-02-09T03:00:00Z
Blocklist path: /etc/pihole/tune-my-hole.list
[!] No reference lists found.
Drop blocklists into:
/etc/pihole/tune-my-hole.d/
To completely remove Tune My Hole:
sudo tmhole uninstallThis removes:
systemdtimer /cronjob- Managed blocklist
- State and config files
User blocklists and Pi-hole data are untouched.
Tune My Hole:
- Reads Pi-hole's FTL query database (read-only)
- Observes which domains your network actually queries
- Intersects those domains with trusted reference lists
- Emits a small, high-confidence local blocklist
No list hoarding. No blind automation. Just evidence-based blocking.
Small tuned lists > big lists.
Blindly stacking massive third-party blocklists is a common pattern and it mostly fails at what it claims to do. Huge lists consume memory, slow down lookups, increase rule churn and introduce false positives all while blocking large numbers of domains that your network will never resolve.
At the same time, keeping a tiny static list without context is just as ineffective. Blocking should be informed by actual network behavior, not guesswork or list hoarding.
Tune My Hole takes a disgustingly straightforward approach:
- Observe what your network actually queries
- Validate those domains against known bad signals
- Block only what is both relevant and high-confidence
The goal is not maximum block count. The goal is accuracy, performance and privacy.