Tiny chip ad blocker · ESP32-C3

A tiny chip.
A quieter internet.

Turn an ESP32-C3 into a home-network ad blocker. A small build with no soldering, based on Muhammed Abozaid’s open-source project.

About 45 minutes to set upESP32-C3 · no solderingDNS filtering for your Wi-Fi
Step 0

What you need

An ESP32-C3 board

Robo Bazar sells one for about ₹200: robobazar.in/product/esp32-c3-mini. Or search “ESP32-C3 SuperMini” on Amazon or Robu.in. Any ESP32-C3 board with 4 MB of flash works. You don't need PSRAM or an “S3” version.

A USB-C data cable

Many cheap cables can only charge. If the laptop can't see the board later, try another cable before trying anything else.

A laptop or desktop

You need it once, to put the software on the board. Windows, Mac and Linux all work. You'll install VS Code, a free code editor, on it.

A place to plug it in

The spare USB port on the back of your router is perfect. An old phone charger works too. Use a steady charger, because a loose one can make the WiFi drop.

What it will and won't block

It works like a phone book. When an app asks for an address on the ad list, the chip says “doesn't exist”, so the ad never loads. Anything served from the same address as the content it sits in can't be split off that way.

Blocks wellBanner and pop-up ads on websites, ads inside many free apps and games, trackers and analytics, and a lot of smart-TV and phone “telemetry”.
Can't blockYouTube video ads, Instagram and Facebook sponsored posts, and Hotstar or JioCinema ads in the middle of a stream. They come from the same servers as the videos, so blocking them would block the videos too. No network-level blocker, including the big Pi-hole setups, can remove these.
How it fits in your home: your router tells each device which “DNS server” to ask for addresses. Normally that's your internet provider. You'll make it the chip instead, and the chip asks a real DNS server (Quad9, 9.9.9.9) for everything that isn't an ad.
Step 1

Put the ad blocker on the board

This is called “flashing”. You do it once, over USB. After that the chip updates itself over WiFi.

The project on GitHub
github.com/M-Abozaid/esp32-c3-adblock

Open it on the laptop. Click the green Code button, then Download ZIP, and unzip it somewhere easy to find.

  1. Install VS Code from code.visualstudio.com. Then open Extensions on the left, search PlatformIO IDE and click Install. Restart VS Code when it asks.
  2. Open the project: File → Open Folder, then choose the unzipped esp32-c3-adblock folder. The first time, PlatformIO downloads its tools in the background. That can take 5–10 minutes.
  3. Set your passwords. In the src folder, copy secrets.example.h and rename the copy secrets.h. Open it and change WEB_PASS and OTA_PASS to passwords of your own. That's your dashboard login later. Leave the WiFi lines as they are, because you'll set WiFi from your phone.
  4. Add the ad list. Download the project's weekly list from
    github.com/M-Abozaid/esp32-c3-adblock/releases/download/blocklist/blocklist.bin
    and put blocklist.bin in the project's data folder.
  5. Plug in the board and flash it. Click the PlatformIO (ant) icon on the left. Under c3, click General → Upload and wait for SUCCESS. Then click Platform → Upload Filesystem Image, which copies the ad list, and wait for SUCCESS again.
Upload fails, or “no serial port”? ① Try another cable, because charge-only cables are the number one problem. ② Unplug the board, hold the tiny BOOT button, plug it back in while you're still holding it, let go and click Upload again. ③ On Linux, the project's README has a one-line fix for ModemManager grabbing the port.
Step 2

Connect it to your WiFi

  1. Plug the board into its home: the router's USB port, or a charger near the router.
  2. On your phone, open WiFi settings. After a few seconds a new network appears, named C3-AdBlock-XXXX. Join it.
  3. A setup page pops up. If it doesn't, open any website and it will. Pick your home WiFi, type its password and save. The board restarts and joins your WiFi, and the C3-AdBlock network disappears.
Use 2.4 GHz. The chip can't see 5 GHz-only networks. Most routers broadcast both under one name, and that's fine. If your 2.4 GHz network has a separate name, pick that one.

Give it a fixed address

Your devices will be told “ask this address for websites”, so the chip's address must never change.

  1. Find its address. Open your router's admin page (usually 192.168.0.1 or 192.168.1.1; the login is often on a sticker under the router). Look under Connected devices or DHCP clients for a device whose name starts with esp32c3. Write its IP down, for example 192.168.0.150.
  2. Reserve it. In the same admin pages, find Address Reservation, DHCP Reservation or Static Lease, and reserve that IP for the chip. This is the step people skip, and it's why “ads came back after a week”.
  3. Peek at the dashboard. On a laptop, open http://c3adblock.local or http://<its IP>. You'll see live counts of blocked and allowed requests for each device.
Step 3

Point your devices at it

Try it on one phone first. When you're happy, switch the whole house over.

A · One device, to try it

AndroidSettings → WiFi → tap your network → IP settings: Static → DNS 1 = the chip's IP. Keep the other values it fills in.
iPhone / iPadSettings → Wi-Fi → ⓘ next to your network → Configure DNS → Manual → delete the existing servers and add the chip's IP.
WindowsSettings → Network → your WiFi → Hardware properties → DNS server assignment → Edit → Manual, IPv4 on, Preferred DNS = the chip's IP.
MacSystem Settings → Wi-Fi → Details → DNS → remove the old entries with − and add the chip's IP with +.

B · The whole home, the real goal

In the router admin page, find DHCP settings (sometimes under LAN). Set Primary DNS to the chip's IP and save. Then turn WiFi off and on again on each device (or restart them) so they get the new setting. Smart TVs and the kids' tablet are covered too, with nothing to install on them.

Some internet-provider routers (a few JioFiber and Airtel models) lock this setting. If yours does, use option A on the devices that matter most.

Secondary DNS: leave it empty, or set it to the chip again. If you put 8.8.8.8 or your provider's DNS there, devices quietly use it half the time and ads leak through. The catch: if the chip is unplugged, websites stop loading until you plug it back in or switch DNS back to automatic.
Ads still showing on one device? Some devices skip your router and send DNS somewhere private. On Android, check Settings → Network → Private DNS and set it to Off or Automatic. In Chrome and Edge, open Settings → Privacy → Use secure DNS and turn it off on that device.
Step 4

Test it. Building it isn't enough.

  1. Run an ad-block test on a device you switched over: open d3ward.github.io/toolz/adblock and press Start. Before the chip you'll typically see a low score. After, most of the ad and analytics rows turn green.
  2. Ask it directly. On a laptop terminal (Command Prompt works too), type nslookup doubleclick.net <chip IP>. The answer should be 0.0.0.0. Then try nslookup wikipedia.org <chip IP>, which should give a real address.
  3. Watch the dashboard at c3adblock.local. Your devices appear with their blocked and allowed counts. In a normal home, 10–30% of all lookups being blocked is common.

Keep the ad list fresh, automatically

New ad domains appear every week. The project rebuilds its list every Monday. To make the chip pull that list by itself:

  1. On the dashboard, scroll to Blocklist — Remote auto-update.
  2. Paste this URL and click Save:
    https://github.com/M-Abozaid/esp32-c3-adblock/releases/download/blocklist/blocklist.bin
  3. When the browser asks for a login, it's the dashboard login shown below.
Dashboard login: the username is admin, and the password is the WEB_PASS you set in secrets.h in Step 1. If the dashboard shows a “default credentials” warning, you skipped that step. Set the passwords and click Upload again.
Something broke? The dashboard has a Pause button that switches blocking off for a while, and Block domain adds one you spotted. Updates to the chip's own software also go through the dashboard, so you only use a cable once.
If something's off

Quick fixes

A website or app stopped working

Some sites break when their trackers are blocked. Pause blocking on the dashboard for five minutes. If that fixes it, the default list blocked something that site needs. The default list is chosen to keep WhatsApp and social apps working.

The whole internet stopped working

The chip is off or lost WiFi. Check that it has power (a steady charger, not a loose adapter). To get online straight away, set the device's or router's DNS back to automatic. Fix the chip, then switch back.

The C3-AdBlock network never appeared

Give it 30 seconds after power-on. If it's still missing, the board is probably still on an old WiFi it can reach. Hold BOOT while plugging it in to wipe its saved WiFi and bring the setup network back.

I changed my WiFi password or router

Use Forget WiFi on the dashboard, or hold BOOT while powering on. Then repeat Step 2. You don't need to flash it again.

Ads are back after a few days

The chip got a new IP from the router. Do the reservation part of Step 2, then put the new IP in Step 3.

It's slow, or pages pause before loading

Move the chip closer to the router, or into the router's own USB port. Its tiny antenna is the zig-zag line at the end opposite the USB port, so keep that end away from metal.

How do I undo everything?

Set DNS back to automatic on your devices or router, then unplug the chip. Nothing else on your network was changed.

Why the tiny chip is enough

Most ESP32 ad blockers keep the whole domain list in memory, so they need a bigger, pricier chip. This project stores a tiny 5-byte fingerprint of each domain in the board's storage, in order, and looks each one up in about 18 steps. That's over 100,000 domains using about 50 KB of memory, and each lookup takes about 10 ms. All credit goes to the project's author, Muhammed Abozaid.

Made for the Accidental Engineering reel. Follow along for the next experiment.

Built on esp32-c3-adblock by Muhammed Abozaid, released under the MIT licence. Full instructions and troubleshooting are also in the downloadable PDF.