Security Engineering
Self-Hosted Network-Wide DNS Security Gateway
What this showed
A working DNS filter at home and on the go, with private remote access and no public DNS, SSH or admin ports.
What I learned
The physical build
One filter for every network I use
Architecture at a glance
How a DNS request moves
At home
- LAN devicesTrusted clients
- Archer AX55Advertises Pi DNS
- AdGuard Home:53 · filter + log
- UnboundLoopback :5335
- DNS hierarchyRoot · TLD · authority
On public Wi-Fi or mobile data
- Phone / laptopAway from home
- TailscaleEncrypted private path
- AdGuard Home:53 · same policy
- UnboundLoopback :5335
- DNS hierarchyRecursive answer
Allowed
LAN + tailnet → AdGuard :53
Internal only
AdGuard → Unbound :5335
Not exposed
Internet → DNS / SSH / admin
Practical checks
Proof it works
01 / Resolver boundary
sudo ss -luntp | grep -E ':(53|5335)\b'AdGuard accepts client DNS on :53. Unbound is reachable only on 127.0.0.1:5335.
02 / DNSSEC negative test
dig @PI_DNS dnssec-failed.orgA deliberately broken DNSSEC domain was rejected. Valid signed domains continued to resolve normally.
03 / Public exposure
nmap -Pn -p 22,53,80,443 PUBLIC_IPNo DNS, SSH or admin service was reachable from the public Internet.
