Guide · Ad blocking

Block ads on all your devices, at home and away

I run AdGuard at home and a few people asked how to get the same thing. Since not all of you have a NAS, the first path needs no hardware at all.

Last updated:

Written from the official docs. The Tailscale DNS settings steps were tested in a Linux test setup, not on real phones or laptops. The AdGuard Home steps were tested in a container sandbox on 2026-11-23 (see each path). When in doubt, follow the official docs.

The short version

Ads are blocked by your DNS, the lookup your device does before it loads a site. Point your devices at a DNS service that refuses to look up ad domains, and the ads never load. Tailscale lets your phone and laptop keep using that DNS when you leave home.

Easiest start: Path A. Free, about 15 minutes, no hardware.

Work devices: please read this first

Do not install Tailscale or change DNS on a work-managed laptop or phone without IT's written OK. A work VPN and Tailscale can clash. Phones run only one VPN at a time, so Tailscale will turn off your work VPN app. Work VPNs that use the 100.64.0.0/10 address range also clash with Tailscale. See using Tailscale with other VPNs (opens in new tab).

First aid: if nothing loads after a change

Open Tailscale and disconnect. Everything goes back to normal. Then undo the last step. With Override DNS servers on, your devices ignore the local DNS and use only the nameservers you set, so a wrong or offline nameserver can look like "the internet is down" (Tailscale DNS docs (opens in new tab)).

Words used here

Tailnet
Your private network of devices that have Tailscale installed.
Global nameserver
The DNS address Tailscale gives to every device on your tailnet.
Upstream
The DNS service your AdGuard Home box asks when it does not block a lookup.
Compose file
A short text file that tells Docker how to run a container.
Macvlan
A Docker network type that gives a container its own address on your home network.

Which path is for me? (30 seconds)

Answer in order. The first answer that points to a path is your path.

  1. Do you have a computer, mini PC, Raspberry Pi or NAS that stays on all the time at home?
  2. Is it a NAS (Synology, QNAP, Ugreen, Unraid, TrueNAS)?
  3. Do you want ad blocking when you are away from home?

The four paths side by side

Cost, time and trade-offs for each ad-blocking path
Path Cost Time Hardware Works away from home Who sees your lookups
A. No hardware $0 About 15 minutes None Yes, on every device with Tailscale AdGuard DNS sees your lookups
B. Your own AdGuard Home Hardware you already own About an hour Any always-on box Yes, on every device with Tailscale Mostly your box; some lookups go to the fallback
C. On a NAS $0 if you already have the NAS One to two hours A NAS that runs Docker Yes, with Tailscale on the NAS Mostly your box; some lookups go to the fallback, if you add one
D. Home only $0 About 15 minutes None, or the box from B or C No Depends on what the router points at

Tailscale's Personal plan is free for up to 6 users and unlimited user devices, for non-commercial use only. Check the pricing page (opens in new tab) before you rely on it.

Path A: No hardware (Tailscale and AdGuard DNS)

Tested on 2026-11-23: the DNS settings steps, in a Linux test setup (Tailscale v1.104.7 in a container, on a throwaway tailnet). With AdGuard's two filtering servers as global nameservers and Override DNS servers on, a blocked ad address answered 0.0.0.0 on 20 of 20 lookups. Turning the settings off again stopped the blocking, so undoing works. Not tested: real phones or laptops (iOS, Android, macOS, Windows), and Override off on a normal device. Those steps are from the official docs. The AdGuard public DNS addresses were also checked with a live lookup on 2026-11-23: a blocked ad address answered 0.0.0.0, the non-filtering address returned real addresses.

Trade-off: AdGuard's public DNS service can see the domains you look up. If you would rather not share that, Path B keeps your lookups with you.

What you need

  • A free Tailscale account.
  • Admin rights on your own tailnet (the first person to sign up has them).
  • Personal devices only. See the work warning above.

Steps

  1. Install Tailscale on each of your personal devices from the download page (opens in new tab) and sign in to the same account on all of them.
  2. Open the DNS page of the admin console (opens in new tab).
  3. Under Nameservers, select Add nameserver, then Custom. Enter the first address below and select Save. Repeat for the second address.
    AdGuard DNS addresses to add, one at a time
    94.140.14.14
    94.140.15.15

    Optional IPv6 versions of the same two services: 2a10:50c0::ad1:ff and 2a10:50c0::ad2:ff.

  4. Turn on Override DNS servers, so your devices use these nameservers instead of the Wi-Fi's.
  5. Devices use Tailscale DNS by default. The setting is called Use Tailscale DNS settings. Only check it if blocking does not work (the exact phone menu path is not verified). On Linux you can set it with this command.
    Linux only: let Tailscale manage DNS
    sudo tailscale set --accept-dns=true

Only add filtering nameservers

Tailscale may ask all nameservers at the same time and use whichever answers first (Tailscale DNS docs (opens in new tab)). In my test, a list with one filtering and one non-filtering nameserver blocked only 7 of 20 lookups, so ads leaked through. Please never add a non-filtering nameserver such as 94.140.14.140.

Verify

  1. On a phone, open AdGuard's check page (opens in new tab) first. It should say Running.
  2. On a computer, run this. It checks the DNS your device is actually using. A blocked domain should answer 0.0.0.0.
    Check that a known ad domain is blocked
    nslookup doubleclick.net
  3. Optional: the third-party ad-block test page (opens in new tab). I have not verified its accuracy.
How to reverse Path A

Need help? Start with first aid.

  1. In the DNS page of the admin console, remove the two nameservers or turn Override DNS servers off.
  2. Or, on one device only: disconnect Tailscale, or uninstall the app.
  3. Your devices go back to using the DNS from the Wi-Fi they are on.

Prefer a service with a dashboard? NextDNS (Tailscale integration (opens in new tab)) and Control D (Tailscale and Control D announcement (opens in new tab)) are built into Tailscale. NextDNS free allows 300,000 queries a month. After that it keeps answering as a plain DNS that does not block, so ads come back until next month (NextDNS pricing (opens in new tab)).

Path B: Your own AdGuard Home on an always-on box at home

The AdGuard Home part (setup, blocking, allow-listing a site, removing it) was tested in a container on 2026-11-23: a blocked ad address answered 0.0.0.0, a normal site answered normally, an allow-list rule made the blocked site load, removing the rule blocked it again, and removing the container closed the port. The Tailscale parts of this path (a home AdGuard Home as the nameserver) are from the official docs and not tested by me.

This follows Tailscale's own Pi-hole guide (opens in new tab), using AdGuard Home instead of Pi-hole. Lookups go to your box, which is on your tailnet.

This path is for a box at home, not a cloud server

AdGuard Home's first-run setup page listens on every network address, and once running, port 53 on a public server would be an open resolver that anyone on the internet could use. This guide does not cover cloud servers. Run the box on your home network, and never forward its ports on your router.

What you need

  • A box at home that stays on: Raspberry Pi, mini PC, or an old laptop.
  • A free Tailscale account with your personal devices on it.

Steps

  1. Install AdGuard Home by following the official getting started guide (opens in new tab). In the setup wizard, choose a strong admin username and password. AdGuard Home has no default password, so the one you pick is the only protection.
  2. On Ubuntu or Debian, port 53 may already be used by the system's own resolver. The Docker Hub page (opens in new tab) explains the fix (setting DNSStubListener=no).
  3. Install Tailscale on the same box. This is Tailscale's official install script (curl | sh, you are welcome to read it first). The first time you run tailscale up it prints a sign-in link: open the link it prints. The --accept-dns=false part tells the box not to use the tailnet's DNS, because the box is the DNS server. The last command shows the box's tailnet address.
    On the box: install Tailscale and keep its own DNS
    curl -fsSL https://tailscale.com/install.sh | sh
    sudo tailscale up --accept-dns=false
    tailscale ip -4
  4. In the DNS page of the admin console (opens in new tab), under Nameservers, select Add nameserver, then Custom. Enter the box's tailnet address (it looks like 100.x.y.z) and select Save.
  5. Choose one:
    • Box only. Add no second nameserver. Your allow-lists on the box work reliably. If the box is off, DNS fails: use first aid.
    • Box plus fallback. Also add 94.140.14.14, a filtering fallback only. Tailscale asks all nameservers at once, so some lookups go to AdGuard's public service, and allow-lists on your own box will not work reliably.
  6. Turn on Override DNS servers.
  7. Optional: stop the box's Tailscale login from expiring. See key expiry (opens in new tab).

Keep it off the internet

Never expose AdGuard Home's admin page or port 53 to the internet, and do not forward them on your router. Also change your router's admin password if it is still the one printed on the label.

Verify

Replace the address with your box's tailnet address.

Ask your box directly about a known ad domain
nslookup doubleclick.net 100.x.y.z

A blocked domain should answer 0.0.0.0. Then run the no-server check from Path A on a device, to prove that device really uses it.

How to reverse Path B

Need help? Start with first aid.

  1. In the DNS page of the admin console, remove the box's address and any fallback, or turn Override DNS servers off.
  2. If you turned key expiry off for the box, turn it back on.
  3. Remove the box from the Machines page of the admin console, or run the command below on the box.
    On the box: sign out of Tailscale
    sudo tailscale logout
  4. Uninstall AdGuard Home from its install folder.
    On the box: uninstall AdGuard Home
    sudo ./AdGuardHome -s uninstall

Path C: On a NAS (Docker)

The AdGuard Home part (setup, blocking, allow-listing a site, removing it) was tested in a container on 2026-11-23, with port mapping, NOT with host networking or on a NAS: a blocked ad address answered 0.0.0.0, a normal site answered normally, an allow-list rule made the blocked site load, removing the rule blocked it again, and removing the container closed the port. Host networking, the NAS specifics and the Tailscale parts are from the docs, not tested.

Same as Path B, but AdGuard Home runs as a container. Use Container Manager, Docker, or the Docker app on Synology, QNAP, Ugreen, Unraid or TrueNAS.

What you need

Steps

  1. Port 53 is often already taken by a NAS service (a built-in DNS or DHCP feature, for example). Turn that off first.
  2. Run AdGuard Home with host networking, as in the file below. The image is pinned to a version, so updates are your choice.
    docker-compose.yml with host networking
    services:
      adguardhome:
        image: adguard/adguardhome:v0.107.80
        container_name: adguardhome
        restart: unless-stopped
        network_mode: host
        volumes:
          - ./work:/opt/adguardhome/work
          - ./conf:/opt/adguardhome/conf
  3. Start the container and open its setup page. The wizard's default admin port is 80, which the NAS's own web page often uses. Pick a free admin port such as 8080 in the wizard, and choose a strong admin password.
  4. On the NAS, turn Use Tailscale DNS settings off (--accept-dns=false). Otherwise the NAS can end up asking itself for DNS in a loop. See Tailscale's client preferences (opens in new tab).
    On the NAS: do not use tailnet DNS
    sudo tailscale set --accept-dns=false
  5. Then follow the Path B steps for adding the NAS's tailnet address as the nameserver, and your box-only or fallback choice.

Not covered: a macvlan network. With macvlan the NAS itself cannot reach the container, so the NAS's Tailscale address would not answer DNS. Making it work needs extra steps (a Tailscale subnet route (opens in new tab) and an access rule (opens in new tab)) that I do not cover here.

Verify

Ask your NAS directly about a known ad domain
nslookup doubleclick.net 100.x.y.z

A blocked domain should answer 0.0.0.0. Then run the no-server check from Path A on a device.

How to reverse Path C

Need help? Start with first aid.

  1. In the DNS page of the admin console, remove the NAS address and any fallback, or turn Override DNS servers off.
  2. If you turned key expiry off for the NAS, turn it back on.
  3. Stop and remove the AdGuard container, then delete its two folders (work and conf).
  4. If you turned a NAS service off to free port 53, turn it back on.
  5. Remove the NAS from the Machines page, or sign it out of Tailscale, if you no longer want it on your tailnet.

Path D: Home only (router DNS)

Not tested by me. Steps are from the official docs and general router knowledge.

Easiest to set up once, and it covers every device at home without installing anything. It does nothing when you are away.

What you need

  • Access to your router's settings.
  • Either AdGuard public DNS (below) or an AdGuard Home address like 192.168.1.x.

Steps

  1. Write down the old DNS values before you change anything, so you can put them back.
  2. Sign in to your router's admin page.
  3. Find the DNS setting. It is often under Internet, WAN or DHCP. Enter the addresses below, or your AdGuard Home address.
    AdGuard public DNS addresses for the router
    94.140.14.14
    94.140.15.15
  4. Save, then restart your devices or reconnect them to Wi-Fi.
  5. Some ISP routers lock the DNS setting. If yours does, set DNS on each device instead, or put your own router behind it.

Details on the other AdGuard modes are on the public DNS page (opens in new tab). Family protection also blocks adult sites (94.140.14.15 and 94.140.15.16).

Verify

Check that your router's DNS blocks a known ad domain
nslookup doubleclick.net

A blocked domain should answer 0.0.0.0.

How to reverse Path D
  1. Go back to the router's DNS setting and enter the old values you wrote down, or choose automatic.
  2. Save and reconnect your devices.

Troubleshooting

Ads still show up in YouTube

DNS cannot block them. YouTube serves ads from the same domains as the video.

A site or app is broken (over-blocking)

Allow that domain. On your own AdGuard Home box, add it to the allowed domains in the filter settings (works reliably only if the box is your only nameserver). With Override on, you cannot give one device a different DNS address. Either turn off Use Tailscale DNS settings on that device for a moment, or use a personal AdGuard DNS or NextDNS account that has its own allow-list.

Hotel or airport Wi-Fi will not let me sign in

Sign-in pages can need your Wi-Fi's own DNS. Pause Tailscale for a minute, sign in, then turn it back on.

It works, but some ads still load

Check for a non-filtering nameserver in the mix. Browsers with their own secure DNS setting skip your filter. So does iCloud Private Relay, which includes DNS: turn it off under Settings, your name, iCloud, Private Relay (AdGuard's notes (opens in new tab)).

Android: DNS does not seem to apply

Android's Private DNS setting may clash with Tailscale DNS. Set it to Off: Automatic can still upgrade to encrypted DNS. This comes from forum reports and is unverified.

I want all my traffic protected, not only DNS

An exit node (opens in new tab) sends all your traffic through another machine. It is a different tool with a different privacy trade-off, and it changes which DNS your device uses by default.

Limits and honesty

  • DNS blocking is not perfect. It stops ads by domain, so ads served from the same domain as content get through.
  • DNS does not hide you or make you anonymous.
  • This guide is a draft. The Tailscale steps were tested only in a Linux test setup, not on real phones or laptops. Each path says exactly what was and was not tested.
  • No warranty. I am not affiliated with Tailscale, AdGuard, NextDNS or Control D.
  • When in doubt, follow the official docs, not this page.
  • Sorry, I am not able to offer one-to-one support.

Changelog

  • : First draft, written from the official docs.
  • : Fact-check pass: safer cloud-box steps, first-aid box, parallel DNS behaviour, reverse steps.
  • : Tailscale DNS settings tested in a Linux test setup; labels updated.
  • : Labels made precise: AdGuard public DNS addresses checked live; AdGuard Home tested in a container sandbox.

Tested on: see the label at the top of each path. Anything not marked as tested comes from the official docs.