ESP32 AdBlock Gateway

A CLEANER NETWORK, WITH MORE CONTROL

Turn an ESP32 into a Wi‑Fi network with DNS ad blocking

Block many ad and tracker domains at DNS level, create a protected network for family and IoT devices, and choose between Router DNS mode or ESP32 Gateway mode.

Firmware and source releases are distributed through GitHub Releases.

🛡️ More privacy 👨‍👩‍👧 Family-friendly network 🚫 Fewer ad domains
ESP32 AdBlock Gateway network diagram An ESP32-S3 board and home router feeding a phone, laptop and smart TV through a filtered network. Protected home ESPRESSIF ESP32‑S3 AD PhoneLaptopSmart TV / IoT

TWO DEPLOYMENT MODES

Use it with the network you already have

Start as a DNS sinkhole, or create a separate protected Wi‑Fi subnet when your ISP router does not allow custom DNS settings.

⚙️

Mode 1 — Router DHCP

  • The router keeps DHCP and gateway duties
  • ESP32 acts as the filtered DNS server
  • Best when the router lets you set custom DNS
Internet→Router→ESP32 DNS→Devices
📶

Mode 2 — ESP32 Gateway

  • ESP32 creates a separate protected Wi‑Fi network
  • It provides DHCP, DNS and IPv4 gateway/NAPT
  • Useful when an ISP router locks DNS settings
Internet→ESP32→Protected Wi‑Fi→Devices

Important: Gateway mode uses a separate subnet behind the ESP32. Do not run two DHCP servers on the same LAN.

WHY USE IT

A small board with a practical network job

🛡️

More privacy

Blocks many tracker and advertising domains before they reach devices.

🚫

Fewer ads

DNS filtering reduces many third-party ad requests across supported apps and sites.

💸

Low cost

Runs on an ESP32-S3 instead of requiring a full mini PC.

🏠

Family & IoT

Create a dedicated filtered network for tablets, TVs and IoT devices.

🔁

Uplink recovery

Gateway mode restores its default route and NAPT after upstream Wi‑Fi returns.

⌘

Open source

Transparent source code, documentation and roadmap under AGPL-3.0.

REAL-WORLD USE CASES

Where this technique is useful

📡

ISP router

Create a protected subnet when the provider firmware prevents custom DNS configuration.

👨‍👩‍👧‍👦

Family devices

Put selected tablets and phones on a separate filtered Wi‑Fi network.

📺

Smart TV & IoT

Reduce common advertising and telemetry domains on devices with limited network controls.

🧳

Travel & lab

Carry a compact DNS/gateway test platform for temporary networks and experiments.

GET STARTED

What you need

1ESP32‑S3N16R8 is the currently validated configuration
2USBCable for programming and power
3Wi‑FiExisting upstream network
4ComputermacOS, Windows or Linux for installation

KEEP THE PROJECT MOVING

Support the project with US$1

A small optional contribution helps maintain firmware, documentation, hardware tests and future features. The software remains open source.

Contribute US$1 Choose another amount GitHub Sponsors must be enabled on the maintainer account for payment buttons to work.

CLEAR EXPECTATIONS

What DNS blocking does — and does not — do

Not 100% ad blocking. DNS filtering cannot reliably block ads served from the same domain as desired content.

Encrypted DNS can bypass it. Apps using their own DoH/DoT resolvers may not use the local DNS server.

IPv6 strategy is still being developed. Current validated gateway behavior is focused on IPv4.

Not a professional firewall replacement. It is a lightweight DNS and policy gateway for appropriate home/lab scenarios.