Mon 20 Jul 2026 / 00:47 ET
Kernel
Hardware 3 min read

Developer squeezes 537,000-domain DNS blocker onto a $5 ESP32 board

ZedAxis’ ESP32-C3 project turns a tiny Wi-Fi microcontroller into a backup ad-blocking DNS filter by hashing blocklists into flash.

Felix Aranda

By Felix Aranda / Silicon Editor

Developer squeezes 537,000-domain DNS blocker onto a $5 ESP32 board
img: Tom's Hardware

Egyptian full-stack developer ZedAxis has published an ad-blocking DNS filter that runs on an ESP32-C3 SuperMini, a tiny Wi-Fi microcontroller board that typically costs only a few dollars. The point is not to dethrone Pi-hole. It is to keep filtered DNS alive when the main home DNS box is rebooting, dead, or otherwise taking the afternoon off.

The project, available on ZedAxis’ GitHub account under M-Abozaid, uses the ESP32-C3 as a backup DNS server for his home network. His primary setup is a Pi-hole, which usually runs on a Raspberry Pi and handles DNS resolution with domain blocking. The ESP32 build sits behind it as the cheap understudy.

ZedAxis says the finished firmware can hold about 537,000 blocked domains, uses roughly 50KB of RAM, and answers blocked DNS lookups in about 10 milliseconds. Those performance numbers come from ZedAxis; no independent benchmark is cited.

How the tiny board stores the blocklist

The useful trick is in the data layout. The ESP32-C3 used here has 400KB of RAM and 4MB of flash storage. That is nowhere near enough room for a large plain-text domain blocklist plus application code, so ZedAxis does not store the domains as text.

During the build process, the software downloads one or more public blocklists, removes comments and duplicate entries, hashes each remaining domain, sorts the result, and writes that compact database into the ESP32’s flash memory. The project uses 40-bit FNV-1a hashes. ZedAxis chose that size because 32-bit hashes would create too many collisions, while 64-bit hashes would burn more storage than needed.

When a DNS request reaches the ESP32, the firmware hashes the requested hostname with the same method and searches the sorted hash table. A match means the domain is blocked. If there is no match, the query is sent to an upstream resolver.

That design trades human-readable blocklists for a lookup table the microcontroller can handle. It also makes the ESP32-C3 viable despite lacking the 8MB of PSRAM found on some higher-end ESP32 variants.

The storage tradeoff

The project also reuses space normally reserved for safer firmware updates. ESP32 devices commonly keep two firmware partitions so an over-the-air update can fail without bricking the board. ZedAxis’ build can give up that second firmware slot and use the space for the blocklist database instead.

With over-the-air updates enabled, ZedAxis says the project can store around 250,000 blocked domains. Disabling that feature raises the figure to about 537,000 domains on the ESP32-C3 SuperMini.

The device includes a basic dashboard for statistics and custom domain blocking, according to ZedAxis’ project material. It does not offer the fuller reporting features associated with Pi-hole or AdGuard Home, such as detailed per-client logs or long-term query history.

ZedAxis powers his unit from the USB port on a Huawei OptiXstar home fiber gateway. The USB connection supplies power only; network traffic goes over the ESP32-C3’s built-in Wi-Fi. The source material says the board draws only a few dozen milliamps, making the router’s spare USB port enough to keep it running.

For most people, a Raspberry Pi, used mini PC, or virtual machine running AdGuard Home will still be the more comfortable choice. ZedAxis’ project is narrower and more interesting: a DNS blocker small enough to disappear behind a router, built by treating 400KB of RAM as a constraint rather than a complaint.

This story draws on original reporting from Tom's Hardware.

More Hardware/

view all ↗