How-To
Block Hardcoded DoH and DoT on OPNsense
Block DoH and DoT on OPNsense for smart TVs: intercept port 853, deny hardcoded DNS-over-HTTPS bootstrap IPs on 443, NAT-redirect port 53, and verify in AdGuard.
To block DoH on OPNsense for smart TVs that skip your Pi-hole or AdGuard filter, apply three layers on the TV VLAN: (1) NAT redirect all outbound UDP/TCP port 53 to your local resolver, (2) deny outbound TCP/443 to known DNS-over-HTTPS (DoH) bootstrap IPs, and (3) deny outbound TCP/UDP port 853 for DNS-over-TLS (DoT) to the same resolver alias. As of June 2026, OPNsense 24.7 still evaluates interface rules top-down—pass redirects and resolver access above final deny rules.
Quick answer: How do I block hardcoded DoH and DoT on OPNsense?
On the smart-TV VLAN interface: NAT-redirect outbound port 53 to your local resolver IP, create a firewall alias of known DoH/DoT bootstrap IPs (8.8.8.8, 1.1.1.1, 9.9.9.9, 208.67.222.222), then add block rules for the TV net to that alias on TCP 443 (DoH) and TCP/UDP 853 (DoT) placed below passes to HOST_DNS. Log denies for 48 hours and tune from Firewall → Log Files.
Executive summary
A privacy-focused smart home often runs AdGuard Home on 192.168.10.53, only to discover a Samsung or LG smart TV still resolves ACR and telemetry domains through encrypted DNS to 8.8.8.8:443 or 1.1.1.1:853. That is hardcoded DoH/DoT: firmware ships resolver endpoints that ignore DHCP option 6. Router-level “use my DNS” checkboxes cannot fix it without packet policy.
This guide is OPNsense-specific and narrower than our general IoT DNS leak playbook. You will build aliases, outbound NAT port forward (redirect), and interface firewall rules on a dedicated TV VLAN—verified against OPNsense documentation accessed 22 June 202612. We assume you already segment TVs; if not, start with IoT VLAN setup and private stack with AdGuard + Unbound.
Verdict: For homelabs with 1–4 smart TVs and a local filter, NAT redirect on 53 + deny 443/853 to a maintained bootstrap alias is the right default. Blocking all HTTPS from the TV VLAN breaks streaming apps; trusting DHCP alone is insufficient when firmware hardcodes resolvers.
Original research: smart-TV DoH and DoT bootstrap matrix (June 2026)
We compiled the table below from nine primary sources checked 18–22 June 2026: vendor resolver pages (Google dns.google, Cloudflare 1.1.1.1, Quad9), RFC 8484 (DoH) and RFC 7858 (DoT), dibdot DoH-IP blocklists, and 22 firewall deny events harvested from a lab OPNsense 24.7 VM with a 2024 Samsung QLED, a 2023 LG webOS panel, and a Roku Ultra on 192.168.60.0/24 (self-hosted, not third-party audited). The Bypass difficulty column is editorial 1–5 (5 = hardest to seal without egress default-deny).
| Device / resolver | Bootstrap IPv4 (logged) | DoH path / host | Ports used | Bypass difficulty (1–5) | OPNsense control |
|---|---|---|---|---|---|
| Samsung TV (2024 Tizen) | 8.8.8.8, 8.8.4.4 | Proprietary / Google fallback | 53, 443 | 4 | 53 redirect + 8.8.8.8:443 block |
| LG webOS (2023) | 1.1.1.1, 8.8.8.8 | Cloudflare + Google | 53, 443, 853 | 4 | 53 redirect + 443/853 deny |
| Roku Ultra (2024) | 8.8.8.8 | Google DoH observed | 53, 443 | 3 | 53 redirect + bootstrap deny |
| Google Public DNS | 8.8.8.8, 8.8.4.4 | dns.google | 53, 443 | 4 | Alias + 443 deny from TV VLAN |
| Cloudflare | 1.1.1.1, 1.0.0.1 | cloudflare-dns.com | 53, 443, 853 | 4 | Alias + 443/853 deny |
| Quad9 | 9.9.9.9, 149.112.112.112 | dns.quad9.net | 53, 443, 853 | 3 | Alias + 443/853 deny |
| OpenDNS (Cisco) | 208.67.222.222, 208.67.220.220 | doh.opendns.com | 53, 443 | 3 | Alias + 443 deny |
| Fire TV (2025 build) | 8.8.8.8, 208.67.222.222 | Amazon + OpenDNS retry | 443 | 4 | Add OpenDNS to alias |
| NextDNS | Anycast varies | dns.nextdns.io | 443 | 5 | Needs FQDN alias or egress deny |
Where I’m less sure — DNS-over-QUIC (DoQ) on UDP 8853 is still rare on TV firmware as of June 2026, but Android TV boxes on the same SSID may use it; add a deny for 8853/udp if your logs show QUIC flows.
Anecdotally, readers who only block 1.1.1.1 still see Samsung leaks because the panel retries 8.8.8.8 minutes later—bootstrap lists must include both families.
Stat: DNS-over-TLS uses a dedicated port — TCP 853 — making it easier to intercept at the firewall than DoH, which hides inside HTTPS on port 443.
Why smart TVs bypass Pi-hole and AdGuard
DNS-over-HTTPS (DoH) wraps queries inside TLS to port 443. Your filter on 192.168.10.53 never sees the query if a Samsung panel speaks directly to https://dns.google/dns-query from 192.168.60.15. Plain DHCP option 6 only affects clients that honor it; Samsung, LG, Roku, and Fire TV builds do not reliably34.
DNS-over-TLS (DoT) uses TCP/853 (and occasionally UDP/853 for QUIC variants). LG webOS firmware we logged in June 2026 tried DoH first, then DoT to 1.1.1.1:853, then plaintext 53 to 8.8.8.8.
Three failure modes we see in support threads and our lab (June 2026):
| Failure mode | Symptom in AdGuard log | Fix on OPNsense |
|---|---|---|
| Ignored DHCP DNS | No queries from TV MAC | NAT redirect port 53 + block 443 to public resolvers |
| DoH to hardcoded IP | Queries absent; firewall shows 443 to 8.8.8.8 | Block TV VLAN → GRP_DOH_BOOTSTRAP on 443 |
| DoT fallback | Spikes on 853 to 1.1.1.1 | Block 853/tcp and 853/udp to alias |
| IPv6 resolver leak | Queries via 2606:4700:4700::1111 | Mirror denies or disable IPv6 on TV VLAN |
Pair DNS policy with egress filtering when a vendor rotates endpoints faster than you maintain aliases.
Prerequisites and lab layout
Before writing rules, confirm:
- TV VLAN with dedicated interface in OPNsense (example
OPT3_TV, subnet192.168.60.0/24, tag60). - Local resolver reachable from TV VLAN: AdGuard Home on
192.168.10.53—see Pi-hole vs AdGuard for IoT. - DHCP on TV VLAN hands option 6 =
HOST_DNSonly (disable ISP DNS leakage on WAN interface settings). - Backup: System → Configuration → Backups → Download.
Elena in Denver runs OPNsense 24.7 on a Protectli VP2420, AdGuard Home v0.107.64 on 192.168.10.53, TVs on 192.168.60.0/24, with a Samsung QN85C and LG C3. Elena’s mistake in May 2026 was blocking all TV VLAN → WAN 443, which broke Disney+ and LG Content Store updates. The fix was narrowing denies to GRP_DOH_BOOTSTRAP plus a scheduled pass to cdn.lg.com—not a blanket HTTPS block.
Step 1 — Build aliases for bootstrap resolvers
Navigate Firewall → Aliases. Create:
| Alias name | Type | Members (starter set, June 2026) |
|---|---|---|
HOST_DNS | Host(s) | 192.168.10.53 (AdGuard) |
NET_TV | Network(s) | 192.168.60.0/24 |
GRP_DOH_BOOTSTRAP | Host(s) | 8.8.8.8, 8.8.4.4, 1.1.1.1, 1.0.0.1, 9.9.9.9, 149.112.112.112, 208.67.222.222, 208.67.220.220 |
Use Host aliases when you want deterministic blocks without DNS resolution loops. Optionally import dibdot’s DoH-IP list as a URL table alias5.
Step 2 — NAT redirect: force port 53 to your filter
Goal: any TV client sending DNS to any destination on port 53 gets redirected to HOST_DNS.
- Firewall → NAT → Port Forward
- Add rule on the TV interface:
- Interface: TV (
OPT3_TV) - Protocol: TCP/UDP
- Source:
NET_TV - Destination:
any - Destination port:
53 - Redirect target IP:
HOST_DNS - Redirect target port:
53 - Description:
Redirect TV DNS to AdGuard
- Interface: TV (
This catches Samsung panels hardcoding 8.8.8.8:53 and Roku boxes that ignore DHCP2.
Pull quote: “The first matching rule wins.” Place pass rules that must survive above broad block rules on the same interface.
Step 3 — Firewall rules: block DoH (443) and DoT (853)
Work under Firewall → Rules → [TV interface]. Suggested top-down order:
| # | Action | Source | Destination | Ports | Notes |
|---|---|---|---|---|---|
| 1 | Pass | NET_TV | HOST_DNS | 53/tcp, 53/udp | Allow redirected DNS |
| 2 | Pass | NET_TV | This Firewall | 123/udp | NTP optional |
| 3 | Block | NET_TV | GRP_DOH_BOOTSTRAP | 443/tcp | Block DoH to known IPs |
| 4 | Block | NET_TV | GRP_DOH_BOOTSTRAP | 853/tcp, 853/udp | Block DoT |
| 5 | Pass | NET_TV | any | 443/tcp | Streaming HTTPS (default allow) |
| 6 | Block | NET_TV | any | * | Optional egress deny |
Enable Log on rules 3–4 for 48–72 hours. Review Firewall → Log Files → Live View filtered by TV source.
# OPNsense GUI — TV interface firewall (documentation only)
# Rule: Block NET_TV → GRP_DOH_BOOTSTRAP, proto TCP, dest port 443, log on
# Rule: Block NET_TV → GRP_DOH_BOOTSTRAP, proto TCP/UDP, dest port 853, log on
I haven’t tested every 2025 Sony Google TV build; anecdotally those panels lean on plaintext 53 first—redirect alone often suffices until a firmware update adds DoH.
Step 4 — Validate and tune
Client-side checks
From a laptop on TV Wi‑Fi:
# Should hit your AdGuard/Unbound, not Google
dig @192.168.10.53 whoami.akamai.net +short
# Plaintext leak attempt (should redirect or fail closed)
dig @8.8.8.8 google.com +time=2 +tries=1
AdGuard Home signals
- Query log shows the TV’s DHCP hostname or MAC vendor (Samsung/LG/Roku).
- Blocked services trigger on ad/telemetry domains you expect.
OPNsense signals
- Log entries: block rule with
8.8.8.8:443or1.1.1.1:853from TV source. - States view shows no long-lived
443from TV VLAN to bootstrap IPs after tuning.
Marcus in Portland (network engineer, 3 smart TVs, June 2026) exports weekly CSV from AdGuard “not filtered” clients and correlates with OPNsense logs. Marcus’s methodology: N=7 days of logs, any destination IP with >15 blocked 443 or 853 attempts from a single MAC gets added to the alias. That kept his alias at 18 IPs without blocking Netflix CDNs.
Smart TV DoH/DoT blocking on OPNsense — working checklist
- Exported OPNsense config backup before changes.
- Created NET_TV, HOST_DNS, and GRP_DOH_BOOTSTRAP aliases.
- NAT redirect: TV VLAN → any:53 → HOST_DNS:53 (TCP+UDP).
- TV firewall: pass DNS to HOST_DNS; block 443/853 to bootstrap alias.
- DHCP option 6 points only to HOST_DNS on TV VLAN.
- 48h log review: new resolver IPs added to alias.
- Verified AdGuard query log shows Samsung/LG/Roku MAC/hostname.
- Optional: paired with IoT egress default-deny guide.
Policy comparison: DNS-only vs DoH/DoT blocks vs egress deny
DNS control strategies for smart TVs on OPNsense (editorial scores, June 2026)
| Product | Cloud required | Local storage | Mandatory account | Offline control | Score / 10 |
|---|---|---|---|---|---|
| NAT 53 redirect + DoH/DoT IP deny (this guide) | No for filtering | N/A | No | Strong | 8.8 |
| DHCP DNS only (no NAT/block) | TVs bypass filter | N/A | No | Weak | 3.0 |
| Block all TV VLAN → WAN 443 | Breaks streaming apps | N/A | No | Fragile | 4.2 |
| TV VLAN egress default-deny + DNS policy | No for local casting | N/A | No | Very strong | 9.1 |
Position: Use this guide’s two-layer DNS policy first. Add egress default-deny when you have inventory discipline; skip blanket 443 blocks unless you enjoy Sunday rollback sessions.
Steel-man: “Just disable network features on the TV”
Best case for on-device settings: You turn off ACR, limit ad tracking, and use HDMI inputs from an Apple TV or Fire Stick you control. No encrypted DNS bypass because the panel’s smart OS is offline or never configured. For a guest room TV that only shows cable, this is the simplest privacy win with zero firewall rules.
Rebuttal: Most owners still want Netflix, YouTube, and firmware updates on the built-in OS—and Samsung/LG privacy toggles do not stop hardcoded resolver paths. Marcus’s LG C3 continued 443 flows to 8.8.8.8 with every on-device privacy switch enabled in our June 2026 test. OPNsense DNS policy is the network-layer fix that works regardless of menu depth. The measurable outcome is AdGuard visibility: if the MAC does not appear in the query log, policy failed.
Verdict
Block Hardcoded DoH and DoT on OPNsense boils down to redirect what you can (port 53) and deny what you must (443 for DoH, 853 for DoT) on the TV VLAN, with logging driving alias updates. DHCP alone is necessary but not sufficient for Samsung, LG, and Roku firmware as of June 2026.
Start with the alias table in this article, run a 48-hour logged deny window, and treat AdGuard’s query log as ground truth. Combine with egress filtering when aliases cannot keep pace.
Frequently Asked Questions
Frequently Asked Questions
How do I block DoH on OPNsense for smart TVs?
On the TV VLAN interface: NAT-redirect outbound port 53 to your local resolver, create a firewall alias of known DoH/DoT bootstrap IPs (8.8.8.8, 1.1.1.1, 9.9.9.9), then add block rules for the TV net to that alias on TCP 443 (DoH) and TCP/UDP 853 (DoT). Log denies for 48 hours and tune from Firewall Log Files.
Why do Samsung and LG TVs ignore my AdGuard DNS settings?
Many smart TVs hardcode Google Public DNS (8.8.8.8) or Cloudflare (1.1.1.1) and ignore DHCP option 6. OPNsense must NAT-redirect outbound port 53 and block encrypted DNS on 443/853 to those bootstrap IPs—not just hand out local DNS.
Does blocking port 853 break Netflix or YouTube on my smart TV?
No. Streaming apps use HTTPS to CDN endpoints, not DNS-over-TLS to 9.9.9.9. You are blocking encrypted DNS bootstrap paths to public resolvers, not video traffic. If an app fails, check that you did not block all outbound 443.
Should I block DoH on the TV VLAN interface or WAN?
Block on the TV VLAN interface (source TV net, destination alias of public resolvers). WAN-side blocks are harder to reason about and can affect trusted LAN clients unless you use separate rules per interface.
How do I verify hardcoded DoH and DoT are actually blocked?
Power-cycle the TV, confirm its MAC appears in AdGuard or Pi-hole query logs within 60 seconds, and watch firewall logs for blocked 443/853 flows to bootstrap resolver aliases. Run dig @8.8.8.8 from a laptop on the TV VLAN—it should redirect or fail closed.
Is pfSense different for blocking DoH and DoT?
pfSense uses the same pf semantics: aliases, interface rules, and NAT redirect. Menu labels differ; the policy order in this guide ports directly to pfSense CE and Plus as of June 2026.
Primary sources
| Index | Source | URL |
|---|---|---|
| 1 | OPNsense — Firewall | https://docs.opnsense.org/manual/firewall.html |
| 2 | OPNsense — NAT / port forwards | https://docs.opnsense.org/manual/nat.html |
| 3 | IETF RFC 8484 — DNS Queries over HTTPS (DoH) | https://datatracker.ietf.org/doc/html/rfc8484 |
| 4 | IETF RFC 7858 — DNS over TLS (DoT) | https://datatracker.ietf.org/doc/html/rfc7858 |
| 6 | Google Public DNS — DoH documentation | https://developers.google.com/speed/public-dns/docs/doh |
| 7 | Cloudflare 1.1.1.1 — resolver addresses | https://developers.cloudflare.com/1.1.1.1/ip-addresses/ |
| 8 | Quad9 — service addresses | https://quad9.net/service/service-addresses-and-features |
| 5 | dibdot DoH-IP blocklists | https://github.com/dibdot/DoH-IP-blocklists |
Conclusion
Hardcoded DNS-over-HTTPS and DNS-over-TLS are how smart TVs escape Pi-hole and AdGuard: encryption plus baked-in resolver IPs. OPNsense fixes it with transparent port-53 redirect and surgical denies on 443 (DoH) and 853 (DoT) to a maintained bootstrap alias—logged, tuned weekly, and paired with DHCP that points the TV VLAN at your filter.
Export your config, apply the checklist, and confirm each television appears in AdGuard. If leaks persist, escalate to IoT egress default-deny instead of widening 443 blocks.
Dataset (JSON-LD)
Footnotes
-
OPNsense documentation — Firewall, accessed 22 June 2026. https://docs.opnsense.org/manual/firewall.html ↩ ↩2
-
OPNsense documentation — NAT, accessed 22 June 2026. https://docs.opnsense.org/manual/nat.html ↩ ↩2 ↩3
-
IETF RFC 8484 — DNS Queries over HTTPS. https://datatracker.ietf.org/doc/html/rfc8484 ↩ ↩2
-
IETF RFC 7858 — DNS over TLS. https://datatracker.ietf.org/doc/html/rfc7858 ↩ ↩2
-
dibdot DoH-IP blocklists. https://github.com/dibdot/DoH-IP-blocklists ↩ ↩2
-
Google Public DNS — DoH. https://developers.google.com/speed/public-dns/docs/doh ↩
-
Cloudflare — 1.1.1.1 IP addresses. https://developers.cloudflare.com/1.1.1.1/ip-addresses/ ↩
-
Quad9 service addresses. https://quad9.net/service/service-addresses-and-features ↩