Pocket AdBlock
EN
Ko-fi

Setup guide

From a bare board to a network without ads in about ten minutes.

Install

  1. Open the web installer in Chrome or Edge on a computer.
  2. Pick your board and the edition (Lite for every board, Pro for boards with PSRAM).
  3. Plug the board in with a data USB cable and press Connect and install. If no serial port shows up, hold BOOT while plugging it in.

Building it yourself instead? The README has the ESP-IDF commands and the build-time options.

First setup

  1. Join the Wi-Fi Sinkhole-XXXX (password sinkhole-setup). Phones open the setup page by themselves; otherwise go to http://192.168.4.1 and log in as admin / sinkhole.
  2. Settings → Your Wi-Fi: enter your network. Once it connects, the page shows the device's new address, and its setup network switches off 30 s later.
  3. Change the admin password and the setup network's password (Settings). A banner reminds you while the default admin password is set.
  4. Point your devices at it (next section). It is also reachable as http://sinkhole.local.

The device's web interface is in English and Spanish (Settings → Language).

Point devices at it

The router is the best place: every device is covered at once. In its LAN / DHCP server settings, set the DNS server to the device's address and leave the second DNS empty.

One device at a time:

DeviceWhere
Windows 11Settings → Network & internet → Wi-Fi → Hardware properties → DNS server assignment → Edit → Manual, IPv4 on, Preferred DNS
AndroidWi-Fi network → Edit → Advanced options → IP settings: Static, DNS 1. Also set Private DNS to Off or Automatic. Menu names vary by brand.
iPhone / iPadSettings → Wi-Fi → ⓘ → Configure DNS → Manual, remove the others, Add Server
Linuxnmcli con mod "<connection>" ipv4.dns <address> ipv4.ignore-auto-dns yes, then nmcli con up "<connection>"

If your router can't change its DNS setting, the device can hand out addresses itself: Settings → DHCP server (give the device a static IP and turn off the router's DHCP first).

IPv6 and bypass protection

Networks hand out two kinds of DNS: IPv4 and IPv6. If your router advertises its own or your ISP's IPv6 DNS, phones and PCs quietly use that one and ads come back. Either set the router's advertised IPv6 DNS to this device (it answers over IPv6 too, at the addresses shown on the overview), or turn off IPv6 DNS advertisement. The overview reminds you when your network routes IPv6.

Settings → Extra protection covers browsers and phones with their own encrypted DNS:

  • Tell browsers and phones to use this DNS (on by default): Firefox turns off its automatic DNS-over-HTTPS, and Apple devices turn off iCloud Private Relay.
  • Block known encrypted-DNS servers (off by default): blocks the names of well-known DNS-over-HTTPS servers. A phone with Private DNS set to one of them loses Internet until it is set back to Automatic or Off.

Blocklists

Settings → Updates → Blocklist picks one of the lists this project rebuilds every day. The device checks for a new version every 6 hours.

ListDomainsFor
Light~40kAds and malware, fewest false positives
Normal (default)~120kRecommended
Aggressive~255kMore trackers; boards with 8 MB or more
Strict~600kAggressive plus active malware and phishing; 8 MB or more
Extended~2.1MAggressive plus 1.9M malware and phishing domains; 16 MB boards

A new list goes to a second slot and is checked before it replaces the working one, so a bad download never breaks blocking. The Always allowed list wins over every blocklist, and Devices can turn blocking off for one device (No blocking).

Names

  • Local names (Settings → Local names): nas.home → 192.168.1.10, or send a whole suffix such as lan to your router so its device names and reverse lookups work.
  • Device names: press Name next to a device under Devices. The name follows its MAC address, so it survives a new IP, and shows in the query log and the top clients.

Wake-on-LAN

Add a computer under Wake-on-LAN (name, MAC, and optionally its IP and a port) and press Wake. The device checks first, sends the magic packets, then keeps checking until it answers: "online after 41 s" or "no answer after 3 min". The PC needs wired Ethernet with Wake-on-LAN on in its BIOS and network adapter.

  • Online check: with an IP, the device checks every 30 s by ping, or by connecting to a port you give (3389 Remote Desktop, 22 SSH, 445 file sharing), which also means the service is ready.
  • Watch only: leave the MAC empty to only watch a NAS, a printer or a camera. Tick Alert me to hear when it goes offline or comes back.
  • From anywhere: set an MQTT broker in Settings (TLS, for example a free EMQX Cloud or HiveMQ Cloud deployment). The device only connects out, so there's no port to open on the router.

Pocket Wake wakes them from your phone: under Wake-on-LAN → Phone app the device shows a QR code with the broker details (never a password) to scan. Its setup guide goes from a free broker to the first wake.

mosquitto_pub -h broker -p 8883 -u user -P pass -t sinkhole/wol/office-pc/set -m wake

Home Assistant

With Show in Home Assistant ticked and the broker your Home Assistant uses, a Pocket AdBlock device appears by itself: a Blocking switch; sensors for blocked and allowed queries, blocked share, list size, active clients, uptime and the last restart reason; and a Wake button plus an online sensor for each computer. MQTT changes apply after a restart.

Phone apps

Two free apps go with the board. Neither is needed: everything also works from the board's web page.

Pocket AdBlock app

Finds your boards on the Wi-Fi without knowing their address, remembers each login and opens their web page. Home network only; no remote access, no analytics.

  1. Pocket AdBlock app: the search found a board, with Connect, and a field to type an address

    Find your board

    On the board's Wi-Fi, the app looks for boards by name and by trying every address on the network, so you don't need to know the address. Tap Connect. Not listed? Type its address under Not listed? and tap Try.

  2. Pocket AdBlock app: the login dialog with user, password and Remember on this phone

    Log in

    Use the board's admin user and password. With Remember on this phone on, the password is kept encrypted on the phone and never leaves your network. The app won't save the factory password: change it first in the board's Settings → Admin login.

  3. Pocket AdBlock app: the board list with one board online, its blocked share, queries and list size

    Your boards

    Each board shows whether it's online, its share of blocked queries, its query count and the size of its list. Pause… turns blocking off for 5 minutes, 30 minutes, an hour or until you turn it back on. + Add looks for more boards.

  4. Pocket AdBlock app: the board's web page inside the app, on the Overview tab

    Open the board

    Open shows the board's own web page, already logged in, so everything in this guide works from here, with the tabs at the bottom. ⟳ reloads it, ↗ opens it in the browser and ‹ Back returns to the list.

  5. Pocket AdBlock app: the board menu

    The board menu (⋯)

    Check for updates (and install one), Set up Pocket Wake, Phone alerts to subscribe this phone to the board's ntfy alerts (Pro), Restart history, Restart, and Forget this board, which removes its address and password from the phone only.

  6. Pocket AdBlock app: the Set up Pocket Wake dialog with the board's broker and topic prefix

    Set up Pocket Wake

    Hands the board's broker and topic prefix to Pocket Wake in one tap; the board needs a broker in Settings → Remote wake (MQTT) first. No password is sent: you type the phone's own broker login in Pocket Wake. Without Pocket Wake installed, its web version opens.

Get it: Android APK on the releases page. iPhone: an unsigned .ipa to sideload with your own Apple ID (see its README).

Pocket Wake

One-tap Wake-on-LAN for your PCs from anywhere, through the board's MQTT bridge. It shows whether each computer is on, and follows a wake until the PC answers.

  1. Pocket Wake: broker settings filled in from the board, with the login still empty

    The broker, filled in

    From the Pocket AdBlock app (the step above), or by scanning the QR code on the board's web page under Wake-on-LAN → Phone app: the broker, port, TLS and topic prefix come filled in.

  2. Pocket Wake: a passed connection test, with the board online, 3 PCs found and ad blocking on

    Log in and test

    Type the phone's own broker user and password, not the board's, and tap Test connection. It checks the login, that the board is online and which computers it has. Then tap Save.

  3. Pocket Wake: the connection, the board's ad blocking and the computers, one of them waking

    Wake your computers

    Wake shows the wait (“Waking… 12 s”) and the result (“Online after 23 s”), with Cancel. Watch-only devices, such as a printer, show their state without a Wake button. The Ad blocking card turns blocking on or off and shows the board's figures. On Android, long-press the app icon for the last PCs woken, or use ⋮ → Add to home screen on a PC for its own icon.

Get it: Android APK on the releases page. iPhone, iPad and any browser: the web app (on iPhone, Share → Add to Home Screen). Step by step: its setup guide.

Notifications Pro

Settings → Notifications sends alerts to your phone through ntfy (free app, no account) and/or a Telegram bot, and can take a few commands back. Outgoing connections only.

  • ntfy: press Generate for a random topic (it works like a password), save, and subscribe to it in the ntfy app. Commands go to <topic>-cmd.
  • Telegram: create a bot with @BotFather, paste its token, save, send /start to the bot, then press Find to fill in your chat ID.
  • Alerts: crashes and firmware updates, wake results, watched devices going offline or coming back, failed list updates, Wi-Fi back after an outage.
  • Commands (off until you tick Accept commands): status, hosts, wake NAME, cancel NAME, pause [minutes], resume.

Away from home

The board can't run a VPN itself, but your phone and laptop can still use it while away through Tailscale and one always-on machine at home:

  1. On that machine, share your home network as a subnet router: sudo tailscale set --advertise-routes=192.168.1.0/24, then approve the route in the admin console.
  2. In the admin console's DNS page, under Global nameservers, add this device's LAN address and turn on Override DNS servers.
  3. Linux only: sudo tailscale set --accept-routes.

All tailnet devices show up as one client (the subnet router), and while the override is on, DNS away from home stops whenever your home Internet or the board is down.

Updates and backups

  • Firmware checks for a new release 2 minutes after starting and then once a day (Updates → Online updates), and offers Install. With Install updates automatically on, new releases install themselves. A new firmware has 60 s to prove it starts up healthy, or the board goes back to the previous one.
  • Restarts (Updates → Firmware) lists the last 10 restarts with the reason, and Device log shows the board's log live.
  • Backup and restore (Settings): one file with your settings, custom lists, local names, Wake-on-LAN computers and device rules. Passwords are left out unless you tick Include passwords.

Recovery and the status LED

SituationWhat happens
No Wi-Fi set upThe setup network is on, with its setup page
Wi-Fi not found, wrong password or lostThe setup network comes back on, and the Wi-Fi is retried forever; the reason shows in the web UI
Hold BOOT 3 sSetup network on for 15 minutes, for example if you forgot the device's address
Hold BOOT 10 sFactory reset: settings erased, the blocklist kept

Settings → Status LED shows the state on the board's LED once you pick your board (or Custom): yellow while in setup, teal without Wi-Fi, blue while downloading, fast red on a failure, an orange flash while paused, and dim green (or off) when all is well.

Security

  • The web UI is plain HTTP on your home network, behind an admin login. Change the default passwords; the setup network uses WPA2.
  • The admin password is stored as a hash, and repeated wrong passwords slow down, up to 10 minutes between tries.
  • While the default password is still set, the device only answers pages opened by its IP or a local name, so a website can't reach it with the published password.

The README has the details: list formats, signing, build options and measurements.