No programming required. Simply upload your current code to the ESP32-S3.
Adrian Kingsley-Hughes/ZDNET
Stay updated with ZDNET: Set us as your preferred source on Google.
Key points from ZDNET
- An affordable $7 board can handle ad blocking tasks.
- It functions as a DNS sinkhole, removing ads before they’re downloaded.
- Additional choices involve using a Raspberry Pi or purchasing dedicated hardware.
They say necessity drives innovation, and the rising costs of Raspberry Pi boards have certainly pushed me to explore cheaper, potentially more suitable options. The Pi is a fantastic board, but for many of the tasks I’ve used it for over nearly 15 years, it’s often been more than what was needed.
Recently, I needed to set up an ad-blocking solution—not because I have anything against ads, but because I was dealing with very limited bandwidth. My first instinct was to grab a Raspberry Pi, but I paused when I recalled how expensive they’ve become these days and set it back down.
Also: I tested a Bluetooth tracker that uses LoRa mesh networks to locate items—and it’s incredibly precise
I planned to run PiHole on the Pi, but then I remembered finding an ad-blocking project designed for an ESP32 board. The great news is that you can get one of these boards for less than $10.
ESP32-S3 (left) compared to ESP32 (right).
Adrian Kingsley-Hughes/ZDNET
Meet the ESP32-S3
There’s a significant gap between a Raspberry Pi 5 and an ESP32 board (specifically the ESP32-S3). The Pi 5 runs on a 2.4 GHz quad-core Arm Cortex-A76 64-bit processor, has gigabytes of RAM, and supports microSD or fast NVMe SSD storage, whereas the ESP32 uses a dual-core Tensilica Xtensa LX7 32-bit processor operating at up to 240 MHz, 520 KB of RAM, and up to 16MB of flash storage.
Also: I created my own Wi-Fi router using a Raspberry Pi for Starlink and solar management—here’s my approach
A Pi 5 can draw up to 12 W of power (and that’s before adding various HATs and accessories), while an ESP32 board consumes just milliwatts.
For this project, I’m perfectly fine with the ESP32, though there are some trade-offs I’ll need to accept—more on those shortly.
What you’ll need
First, you’ll need an ESP32 board. Look for the ESP32-S3 with 8MB of PSRAM (there’s also a 4MB version, but choosing that one will mean making some compromises) instead of the standard ESP32. The ESP32-S3 is quicker and more power-efficient, and you’ll need that capability to run the ad-blocking software. The most budget-friendly way to purchase these boards is in a 3-pack for $20.
When you first receive an ESP32-S3 board, it’s natural to think, “This is so small, there must be more to it,” but there isn’t. It’s genuinely a computer you can balance on your fingertip.
Of course, you’ll need a USB-C cable to transfer data and supply power to the board. However, you won’t even need a microSD card for it to function.
Also: I attached a $17 solar panel to my doorbell camera, and it’s been my smartest home upgrade yet
Regarding the software, you’ll also need to download ESP32_AdBlocker, which handles all the heavy lifting. You’ll also need the Arduino IDE tool to install the software onto the board. The installation process is straightforward—set up the Arduino IDE to work with the ESP32 board, open the project in the application, connect the board to your computer, and click upload.
Keep in mind that when you plug the ESP32-S3 board into your computer, it has two USB ports. You want the one labeled COM or USB/Native (when looking down at the board with the ports at the bottom, this is the right-hand port). If that doesn’t work, try the other port.
If you run into any issues, plenty of help is available. One of the most common problems I see people encounter is trying to connect the ESP32 to their computer using a charge-only USB-C cable. I also had to adjust the compile and board settings in the Arduino IDE software. I’ve included a screenshot below showing the settings I used to get everything working.
And finally, if you want a case for the ESP32-S3 board, you have several options. You can purchase one, 3D print one, or improvise by wrapping it in some electrical tape or large-diameter shrink-wrap tubing (about 1.5 inches wide).
Configuring the board
Alright, you’ve uploaded the software to the ESP32. Now it’s time for the initial boot and to configure the board. Your ESP32 is now a network device.
On first startup, the ESP32 enters Wi-Fi access point mode with a name that begins: ESP32_Adblocker_XXXXXXXXXXXX (where each X represents an alphanumeric character).
Once you’ve connected to the Wi-Fi, navigate to 192.168.4.1 and enter the Wi-Fi SSID and password for your router. After another restart, it’s time to specify the URL of the blocklist you’d like to use (you can find a huge collection of blocklists here), and then you’re essentially finished with the board setup.
We’re in. ESP32_Adblocker has been successfully installed.
Screenshot by Adrian Kingsley-Hughes/ZDNET
The only remaining step is to configure your devices to send DNS requests (more on this shortly) to the ESP32 board. To do this, you’ll need to take that earlier address—192.168.4.1—and
use it as the DNS address. A great way to figure out how to set this up is to look at CloudFlare’s detailed guides for each platform (just remember to point the DNS to your ESP32’s IP address, not CloudFlare’s 1.1.1.1 address).
But how does it actually work?
Whenever you enter a web address or tap on a hyperlink, your browser needs to figure out where on the internet that particular page is hosted. To get this information, your browser reaches out to an online lookup service known as a DNS server through a process called DNS lookup (DNS is short for Domain Name System).
Imagine DNS as a contact list, but instead of phone numbers, it maps to server addresses. The web page itself, along with all of its elements — the images, any video or audio files, animated under-construction GIFs, and yes, the advertisements — might all be hosted in one place or pulled from servers scattered across the globe. The browser resolves the addresses of every single component so it can assemble and display the full page for you.
Now here’s where it gets interesting. Since you’ve configured your phone, computer, or router to query the ESP32 board for DNS information (which is exactly why you needed to adjust the router’s DNS settings for this method to function), every single DNS request gets routed through that small ESP32 board first.
Also: My 7 must-have laptop-bag essentials after years of remote work
The ESP32_AdBlocker software maintains a blocklist containing millions of known ad-serving addresses. In simple terms, whenever the browser tries to fetch something that appears on that blocklist, the software responds by telling the browser the resource doesn’t exist — redirecting it to the 0.0.0.0 DNS address — and the ad never loads, which saves you a small amount of bandwidth. If the requested address isn’t on the blocklist, the board forwards the DNS query to a regular DNS server as normal.
What you’ve essentially created is a DNS sinkhole that catches the vast majority of ads you encounter while browsing the internet.
There are some drawbacks, though. For instance, this method can’t block YouTube ads because those ads are delivered from the same server and the same address as the actual video content you want to watch — so filtering out the ads would also block the videos themselves. The technique also doesn’t support newer IPv6 internet addresses.
Still, this project is a great demonstration of what you can accomplish with a tiny microcontroller that costs less than $10.
The ESP32-S3 actively filtering ads in real time.
Adrian Kingsley-Hughes/ZDNET
Not the only option
For my specific use case — a temporary fix for a bandwidth-limited internet connection — this approach does the job. And it was a fun and educational project to tinker with. If I were looking for a more permanent solution, or if I didn’t want to introduce any slowdown on a high-speed internet connection, a Raspberry Pi Zero 2 W running PiHole would be a solid alternative.
Also: I tested a $15 smart switch and discovered a coffee maker burning through $1,500 a year in electricity
However, that route bumps the cost up to at least $15 for the board alone, plus you’ll need a microSD card. Nothing that’s going to break the bank, but it’s definitely a step up in price.
You could also run PiHole on a dedicated spare computer, or inside a virtual machine on an existing machine. Or you could simply purchase a device that comes with ad-blocking built in. But where’s the fun in that? Different solutions for different needs.



