How I fixed Docker client attribution in AdGuard Home on a Synology NAS and verified selective DNS filtering—without changing DNS settings across the entire household.
I set out to make my Synology NAS easier to access over HTTPS without certificate warnings. During that work, I installed AdGuard Home, a DNS filtering service that can run on existing hardware rather than on a dedicated router. The certificate issue and DNS filtering are separate concerns: a valid hostname and TLS certificate address browser trust, while AdGuard answers DNS questions and optionally blocks selected domains. Installing a DNS filter alone does not repair an invalid certificate.
Once AdGuard was running, its dashboard showed 8,587 DNS queries in 24 hours, with 2,074 blocked (about 24%). That immediately raised a different set of questions. Which devices were asking these questions? Why was AdGuard seeing only one client? And how could I filter household devices without altering the DNS behavior of two employer-managed laptops?
The useful part of this project turned out to be less about installing an ad blocker and more about understanding the DNS path, correcting Docker networking, and rolling out a service selectively.

Figure 1. Initial AdGuard statistics. The client address is permanently redacted; the entire query count was attributed to one Docker-network client.
Environment and objective
The environment was a Synology DS220+, Synology Container Manager with a Compose-managed AdGuard Home container, and an AT&T BGW320 gateway providing routing and DHCP. The screenshots show the DSM 7-style interface, but I did not capture the exact DSM build. The container used adguard/adguardhome:latest; its actual installed image version or digest was not recorded.
The intended design was deliberately selective. Personal phones, tablets, Macs, Apple TVs, and certain smart-home devices would use the NAS as their DNS resolver. The work laptops would retain their existing DNS arrangements. The gateway would continue routing traffic and assigning addresses; I was not replacing the home router or globally changing DHCP-provided DNS.
A DNS filter does not sit in the route of every web connection. A participating client sends a DNS query to AdGuard. AdGuard may answer from cache, block a listed hostname, or forward an allowed request to an upstream resolver. The client then connects to the returned IP address through the usual gateway. AdGuard Home is not a full packet-inspection firewall, and a DNS query does not prove data was subsequently sent to the named service.
The first problem: every client looked like Docker
The initial dashboard showed every request under one Docker bridge-gateway address. The Container Manager project showed a custom bridge network with published TCP and UDP port 53, plus a published management port. Read-only netstat output confirmed that docker-proxy was handling those published ports.
To separate an assumption from an observation, I ran a controlled lookup from a Kali laptop:
# Example only: replace <NAS_IP> with the actual LAN address.
# Sends a DNS query; does not change the client DNS configuration.
dig @<NAS_IP> example.com
Resolution succeeded, but the AdGuard Query Log still identified the request as coming from the Docker bridge gateway rather than the Kali laptop's address. This was the decisive test: DNS connectivity worked, while the client identity needed for per-device policies did not.
The official AdGuard Home Docker documentation specifically recommends host networking when the original DNS client addresses appear as a Docker gateway. Docker's documentation explains why: in host mode the container shares the host's network namespace, with no published-port proxy in between.
Migration: backups first, then host networking
Before modifying anything, I checked for potential port conflicts, verified that the NAS itself used the gateway—not the AdGuard container—for DNS, and saved the persistent configuration, working data, and Compose file. I then stopped the project and made another copy of the AdGuard data while it was no longer changing. Those steps mattered because a DNS outage can make the network feel broken even while Internet routing remains functional.
With AdGuard stopped, I changed its configured HTTP and DNS listeners from all container interfaces to the NAS's intended LAN IPv4 address. I also replaced the Compose bridge configuration with a host-network configuration. The following is a sanitized structural example, not the original production file:
services:
adguard-home:
image: adguard/adguardhome:latest
container_name: adguard-home
restart: unless-stopped
network_mode: host
volumes:
- <NAS_CONFIG_DIRECTORY>:/opt/adguardhome/conf
- <NAS_WORK_DIRECTORY>:/opt/adguardhome/work
<NAS_CONFIG_DIRECTORY> and <NAS_WORK_DIRECTORY> represent existing persistent directories on the host; substitute their real absolute paths. network_mode: host changes container networking, and host networking does not use a ports: mapping. The application listener settings also need to be checked, especially to avoid unintentionally listening on every host interface. In this deployment the intended management and DNS addresses were restricted to the NAS LAN IPv4 interface.
The active Compose file passed validation. I recreated the service with:
# Run only after a backup, port-conflict check, listener review,
# and successful Compose validation. This recreates the container.
sudo docker compose -f compose.yaml up -d --force-recreate
# Read-only verification of the new container network mode:
sudo docker inspect adguard-home \
--format 'Network mode: {{.HostConfig.NetworkMode}}'
Docker reported the container running and Network mode: host. The AdGuard administration page remained accessible, and a second direct dig query succeeded. Most importantly, the new query was attributed to the Kali laptop's individual LAN address. Older entries still showed the bridge gateway because they were historical logs, not evidence that the migration failed.

Figure 2. Controlled before-and-after DNS lookups. Original client IPs have been solid-redacted; the new entry was identified as the laptop rather than the earlier Docker gateway.
A second finding: encrypted upstream DNS isn't automatically threat blocking
AdGuard was configured to forward allowed DNS queries using DNS-over-HTTPS to https://dns10.quad9.net/dns-query. That encrypts the AdGuard-to-Quad9 leg, but Quad9 documents the dns10 service as its no-threat-blocking option. This is distinct from Quad9's threat-blocking endpoint, https://dns.quad9.net/dns-query.
The dashboard's advertising and tracker blocks in this investigation came from AdGuard's own configured filter rules. I did not switch the upstream service during this session, and I would not claim independent upstream malware blocking was enabled. The AdGuard DNSSEC option was checked, but I did not separately test end-to-end validation behavior.
Discovering and onboarding clients
The next challenge was knowing which household device corresponded to each address. I compared AT&T DHCP allocation records with an ARP-based Nmap discovery scan:
# Example subnet: replace with your authorized LAN CIDR.
# Host discovery only; sends probes but does not modify devices.
sudo nmap -sn -PR 192.0.2.0/24 \
-oN <OUTPUT_DIRECTORY>/lan-discovery.txt
-sn performs host discovery without a port scan; -PR requests ARP discovery when scanning a directly connected IPv4 network. The test returned 17 responsive hosts, while the gateway provided additional information about sleeping or offline devices. Hostnames and MAC-vendor clues helped identify hardware, but the device's own settings were the more reliable way to confirm identity.
I established seven fixed DHCP allocations: the NAS, a personal iPhone, iPad, iMac, two Apple TVs, and a smart calendar. A DHCP reservation does not itself route DNS through AdGuard. For devices that exposed the setting, I configured the NAS as the DNS server on their home-network connection, then registered or identified them as separate clients in AdGuard Home. On the iPad, I switched Apple's Private Wi-Fi Address from Rotating to Fixed before reserving its address, retaining a network-specific private MAC without periodic changes that could invalidate the reservation.
What we actually verified
The iPhone's Query Log showed ordinary requests being processed and analytics/tracker requests blocked. The iMac independently showed blocks for Pinterest tracking, Unity advertising configuration, and Yahoo analytics domains.

Figure 3. On the iMac, AdGuard blocked several advertising and analytics lookups; client-identifying columns were cropped out.
The iPad also showed explicit Blocked responses for advertising infrastructure, including Oppo and Unity Ads hostnames. Multiple A, AAAA, and HTTPS entries for one hostname were separate DNS record queries—not proof of multiple data transfers.

Figure 4. iPad filtering verified. These are DNS filter outcomes, not claims about what an app transmitted.
On the Living Room Apple TV, AdGuard blocked Google DoubleClick hostnames while allowing video-related DNS requests. That demonstrated functioning DNS-layer filtering; it did not prove that in-stream YouTube or other subscription-service ads had been removed. A final documented playback test was not captured.

Figure 5. The Living Room Apple TV generated blocked DoubleClick DNS lookups after being pointed to AdGuard.
Limitations and unfinished work
The rollout was not complete at the end of this session. The Bedroom Apple TV had a DHCP reservation, but no post-change filtering log was supplied. The Skylight Calendar also had a reservation but was not deliberately moved to AdGuard; maintaining its cloud synchronization takes priority over aggressively filtering it. Additional personal devices remained to be configured.
The two employer-managed laptops were intentionally left out of the manual-DNS rollout, but their current resolver settings were not individually verified. IPv6 resolver behavior, Apple privacy features, application-specific encrypted DNS, and VPN DNS can complicate enforcement, and a full bypass audit remains outstanding. I also still need to test the effects of NAS downtime on clients, review whether the HTTP-only AdGuard management interface needs LAN-only TLS or additional restrictions, and confirm SSH was disabled after administration.
Finally, DNS filtering is a useful control, not a complete security solution. It cannot inspect encrypted page contents, reliably strip ads served from the same domain as primary content, or identify the payload of a connection. A 24% blocked-query figure is not a measure of malware prevented.
Lessons learned
The biggest improvement here was visibility. Moving a working DNS container from bridge to host networking let me associate new requests with individual LAN devices instead of an opaque proxy address. That made selective filtering practical and gave me a way to troubleshoot unexpected blocks without imposing the same policies on every computer in the house.
The broader lesson is to verify both sides of the architecture: where queries travel and what the service actually does with them. Preserve backups, test a known lookup, compare logs, onboard one device at a time, and resist equating blocked domains with confirmed threats. That's a much more useful outcome than simply installing another security tool.
Merlin's Corner: Who's Barking at the Gate?

Imagine Merlin hears the front gate open and starts barking. He knows somebody has arrived, but if everyone comes through the same doorway wearing the same coat, he can't tell who's who. That makes it pretty difficult to decide whether it's a delivery, a neighbor, or someone coming over to give him a treat.
My DNS filter had a similar problem: it could see requests arriving, but Docker made several devices look like one client. Changing the container's networking helped AdGuard distinguish which device made each request, so I could apply filtering selectively. It still doesn't mean AdGuard can see everything those devices do online. The lesson is simple: before making rules about who gets through the gate, make sure you can tell who's actually at it. And yes, Merlin would still prefer that everyone brought treats.