A running list of what changed on the network between mid-September and mid-October, and why. Some of it is new hardening, some is cleanup, and one item finally closes a problem I first wrote about in June.
Closing the DNS Bypass Routes#
Every device on the network is supposed to resolve DNS through my own resolver. NAT redirect has enforced that for plain DNS for a while. Encrypted DNS was the gap.
Blocking DNS-over-HTTPS on every client zone#
A device that speaks DNS-over-HTTPS doesn't send queries on port 53. It sends HTTPS to a public resolver, which a port-based redirect never sees. I closed that with two block rules on every zone where everyday devices live: Users, the TV and camera VLANs, Guest, and the everyday VPN. One rule blocks a list of 8 public DNS servers. The other blocks 29 known DNS-over-HTTPS and DNS-over-TLS providers. Both block TCP and UDP, because DNS-over-HTTPS increasingly runs over HTTP/3, which is UDP. Logging is on for both.
Order mattered on the camera VLAN. The camera allow rules permit any destination, so the DoH blocks have to sit above them, or the cameras' traffic matches the allow first and never reaches the block.
The camera block caught 70,028 attempts in a burst right after I added it: 11,443 over TCP and 58,585 over UDP, mostly HTTP/3. Then it went quiet. Before that rule, the cameras had been quietly routing around my resolver.
Confirming the redirect covers the cameras#
I verified on the gateway itself, not in the UI, that the NAT redirect covers the camera VLAN on all three ports: DNS (53), NTP (123) and DNS-over-TLS (853). The cameras try DNS-over-TLS on their own, so that last one matters. Those connections now land on the Pi's own DNS-over-TLS listener.
One thing that looked alarming but wasn't: a rule blocking the cameras from reaching outside DNS directly logged 1,566 hits in a single burst. NAT redirect only rewrites new connections. Those hits were connections the cameras had already opened before the rules changed. Once those aged out, the counter stopped.
Ending the Camera Retry Storm#
In June I wrote about sinkholing my cameras' cloud and undoing it. That's where I found the truncation-bit loop: when a client goes over the resolver's per-minute rate limit, Technitium answers with an empty, truncated response that means "retry over TCP." These cameras' firmware never retries over TCP. It just asks again over UDP, which keeps it over the limit forever. Back then, the only fix was power-cycling the camera.
The permanent fix#
This round I took the two affected cameras out of rate limiting entirely, using Technitium's rate-limit bypass list. Before the change, the resolver was dropping roughly 142,000 queries a day, almost all from those two cameras, each stuck at about 91 queries a minute asking for the same authentication name every two seconds. Since the change: zero drops. The rate limiter had also been dropping the cameras' real cloud-API lookups along the way, so removing it fixed more than the noise.
One gotcha worth knowing: Technitium never writes rate-limited queries to the query log. If you search the log for dropped queries you'll always find nothing. The dashboard's Dropped counter and the per-client rate-limited stats are the only places they show up.
A firmware timer, not a fault#
Even with the loop gone, one camera is still by far the busiest client on the network. It checks four names every few seconds, all day: three search engines and its vendor's API, at exactly 200 queries a minute. That's about 79% of every DNS query the resolver answers.
I tested whether it was reacting to my blocks. I gave it real answers and full outbound access, and the rate didn't change at all. It's a hardcoded connectivity-check timer in the firmware. I reverted the test. The search-engine lookups from those cameras get a deliberate NXDOMAIN through a dedicated blocking group, and everything else they need resolves normally. The load is harmless to the Pi. The only real fix would be a firmware update from the vendor.
The other camera in that family is a low-power, battery model. It sleeps, wakes when the app opens or it sees motion, and goes quiet again. Silence from it is normal, not a fault.
The cloud domains stay unblocked#
As covered in June, the vendor API and the cloud clip-storage domain both resolve to their real addresses on purpose. Remote viewing needs the API, and motion-clip recording needs the storage domain. Containment for these cameras comes from the firewall around which devices may reach the internet, not from starving them of DNS.
Performance Tuning#
Smart Queues: an A+ for bufferbloat#
My plan is 1 Gbps down and 50 Mbps up. Bufferbloat is the lag you get when a busy connection lets packets pile up in a queue. I turned on Smart Queues and tuned them with repeated Waveform bufferbloat tests:
| Setting (down/up, Mbps) | Grade | What happened |
|---|---|---|
| 950 / 40 | A | +17 ms upload latency under load |
| 900 / 36 | A | +19 ms download, with spikes to 154 ms (a queue forming at the ISP) |
| 800 / 36 | A+ | Clean, but more speed given up than needed |
| 850 / 36 | A+ | +2–4 ms download, +0 ms upload |
I settled on 850/36, which measures about 770–790 down and 34 up. The 15% given up on the shaper buys a connection that stays responsive under full load, which matters more for games and video calls than a bigger number on a speed test. If I ever raise the download setting above 850, I'll re-test first.
Reworking traffic shaping#
- Removed a per-device limit that was capping my desktop's speed tests at about 750/34. It had been sitting there quietly since an earlier experiment.
- Users VLAN set to Prioritize, unlimited, replacing an old 500/45 cap.
- Caps on the low-trust VLANs: cameras 30/8, TVs 150/10, Guest 100/5 Mbps. Nothing on those networks needs more, and a compromised device can't saturate the line.
One ad blocker, not two#
UniFi's built-in content filter had ad blocking turned on for the Users and TV VLANs, on top of Technitium doing the same job. I paused the UniFi filters. Two blockers means two places to check whenever a site breaks. Worse, the gateway's DNS interception can conflict with the NAT redirect to the Pi. Technitium is now the only place ads and trackers are blocked.
Verifying the Firewall After Two Config Migrations#
UniFi rewrote my firewall configuration on its own twice in three days: once on October 13 and again on October 15, the second time logged as "due to inconsistency." I've been burned by this before. A config migration once silently broke my firewall while the UI still looked perfect. So after the second one, I compared every rule chain in the gateway's kernel against what the UI shows.
- 53 of 64 chains matched exactly.
- The other 11 all had an explanation: IPv6-only system rules, UniFi's built-in mDNS and captive-portal rules, or rules I had disabled on purpose.
- No orphaned rules: nothing in the UI was missing from the kernel, and nothing was running in the kernel that the UI doesn't show.
The UI is a description of what you asked for. The kernel is what's actually enforced. After any migration, firmware update or major change, check the kernel.
What's Next#
A handful of cleanup items are still open. They'll show up in the next changelog once they're done and verified.