I turned a $7 ESP32-S3 into an ad blocker

ESP32-S3 DNS – Ad prices and limited bandwidth pushed one builder to skip a Raspberry Pi setup and instead program an ESP32-S3 with existing ESP32_AdBlocker code. The result: a tiny, under-$10 DNS sinkhole that strips many ad requests before they download—though it won’t han
The problem hit fast and felt personal: a limited-bandwidth connection, an inbox full of links, and the steady realization that loading web ads wasn’t just annoying—it was eating precious data.
So instead of reaching for the usual Raspberry Pi path and then freezing at today’s prices, he tried something smaller. A cheap ESP32-S3 board—something you can balance in your hand—running existing ad-blocking software. The switch, he says, took minutes.
The centerpiece is ESP32_AdBlocker, loaded onto an ESP32-S3 board for under $10. In his setup. the board is specifically the ESP32-S3 with 8MB of PSRAM (he notes there’s also a 4MB version. but using it forces compromises). Hardware-wise. he recommends buying these boards as a 3-pack for $20. and you’ll want a USB-C cable to transfer data and power the board.
For anyone picturing a complicated build, the onboarding is surprisingly straightforward. You don’t need a microSD card, either. You just install the Arduino IDE utility, configure it for the ESP32 board, connect the device to your PC, open the ESP32_AdBlocker project in the IDE, and click upload.
One detail matters when the board connects: the ESP32-S3 shows two USB ports. He says to use the port marked as COM or USB/Native—the one on the right when you look down at the board with the ports at the bottom. If it doesn’t work, try the other port.
He also points to a common trap that derails first attempts: people using a charge-only USB-C cable. In his experience, that’s often the reason the device won’t behave as expected. When things still stall. he says adjusting compile and board settings in Arduino IDE can be necessary—so he included screenshot settings to get it working.
Even the “what do I house it in?” question gets practical. If you don’t want to improvise, you can buy a case. Or 3D print one. Or, he says, MacGyver it with electrical tape or large-diameter shrink-wrap tubing—about 1.5 inches across.
Once the software is on, the ESP32 board becomes a network appliance. On first boot. it starts in Wi‑Fi access point mode with an address that begins ESP32_Adblocker_XXXXXXXXXXXX. where each X is an alphanumeric character. From there, connect to the Wi‑Fi, then go to 192.168.4.1 to add your router’s Wi‑Fi SSID and password.
After another reboot, the setup turns to blocklists. You specify the URL of the blocklist you want the board to use, pulling from what he calls a massive repository of blocklists.
The final step is the one that makes the ad blocking real on your devices: you configure clients to send DNS requests to the ESP32 board. He ties it directly to the earlier address—192.168.4.1—and emphasizes that you should use that as the DNS address. not Cloudflare’s 1.1.1.1 address. He also flags that Cloudflare’s documentation can show how to set it up correctly, depending on the platform.
Then the mechanism clicks into place. When a browser needs to load a website. it performs DNS lookups through a DNS server to find where the page and its components live—images. videos. sounds. and yes. ads included. In this setup. every DNS lookup first passes through the ESP32 board because the router or device is asking it for DNS information.
The DNS sinkhole works because ESP32_AdBlocker holds a blocklist containing millions of internet ad addresses. If the requested address matches the blocklist. the software points the lookup to the 0.0.0.0 DNS address—so the blocked ad never loads. If the address isn’t in the list, the ESP32 board passes the lookup along to a proper DNS server.
In plain terms: it’s not targeting the browser with scripts or extensions. It’s intercepting the name-to-address step so blocked ad endpoints never resolve.
But there are hard limits. He says this strategy doesn’t work with YouTube ads because those ads are served from the same server and at the same address as the videos—blocking them would block the videos too. He also says it doesn’t work with newer IPv6 internet addresses.
Even with those boundaries, the project still delivers a message that’s hard to ignore: a tiny board costing under $10 can do real work.
If this is meant as a temporary fix for a limited-bandwidth connection, he says the ESP32 approach makes sense. For a more long-term solution—especially if you don’t want any speed bump on a faster internet line—he points to a Raspberry Pi Zero 2 W running Pi-hole. But he notes the cost quickly rises: at least $15 for the bare board plus a microSD card.
He also lays out alternatives that move the ad-blocking role away from the main router: running Pi-hole on a separate computer, or in a virtual machine, or buying an appliance that supports ad blocking out of the box.
Still, for him, the appeal is obvious. “What’s the fun in that?” he asks—after showing how quickly a $7 ESP32-S3 can be turned into a working DNS sinkhole using ESP32_AdBlocker.
And when you’re fighting for every megabyte, speed isn’t a feature. It’s the whole point.
ESP32-S3 ESP32_AdBlocker DNS sinkhole ad blocking Arduino IDE Pi-hole Raspberry Pi Zero 2 W cybersecurity bandwidth saving