SecDNS

Set up SecDNS on pfSense with Unbound DoT forwarding

Forward every Unbound query on pfSense to encrypted SecDNS DoT in fifteen minutes, with per-tenant filtering, DNSSEC validation and audit logs.

Set up SecDNS on pfSense

pfSense ships with Unbound, which can forward queries over DoT to SecDNS. Pointing the firewall at SecDNS protects every wired and wireless client with one configuration change.

What you will need

  • A SecDNS account
  • A pfSense CE 2.7 or pfSense Plus 23.09 or newer install
  • Admin access to the web UI
  • The SecDNS anycast resolver IP and the hostname dns.secdns.io

Setup steps

  1. Create a device in SecDNS. Sign in, open Devices and add a new pfSense device. Copy the anycast IP and the DoT hostname. [screenshot placeholder]
  2. Enable Unbound resolver in forwarding mode. In pfSense go to Services, DNS Resolver, General. Tick Enable Forwarding Mode and Use SSL/TLS for outgoing DNS Queries. Leave DNSSEC on. [screenshot placeholder]
  3. Configure upstream DNS in System. Open System, General Setup. Add the SecDNS anycast IP under DNS Server Settings. In the Hostname column on the same row, type dns.secdns.io so Unbound uses the correct TLS SNI.
  4. Disable DHCP DNS override. On the same page untick Allow DNS server list to be overridden by DHCP/PPP on WAN so your ISP cannot inject its own DNS during a WAN renegotiation.
  5. Apply Unbound changes. Click Save, then Apply Changes on the DNS Resolver page. Unbound restarts and begins forwarding DoT to SecDNS.
  6. Test from a client. From any LAN client run dig +short whoami.cloudflare TXT @<pfsense-lan-ip> or visit https://dnscheck.tools. The resolver hostname should match SecDNS infrastructure.

Verify it works

On pfSense open Status, System Logs, Resolver. You should see Unbound establishing TLS to the SecDNS IP on port 853 with no certificate errors. On a LAN client, https://dnscheck.tools should report SecDNS as the upstream. The SecDNS dashboard Live Logs panel fills within seconds.

Troubleshooting

  • Unbound fails to start. Check the resolver log for TLS errors. The most common cause is a missing or mistyped Hostname column entry; it must read dns.secdns.io.
  • High latency on first queries. Increase Outgoing Network Interfaces to WAN only under DNS Resolver, Advanced. Also ensure Prefetch DNS Key Support and Prefetch Support are enabled.
  • Some clients still use ISP DNS. Add a NAT redirect rule that catches outbound UDP and TCP 53 from the LAN and rewrites the destination to the firewall.
  • DNSSEC failures on legit domains. Verify the DNSSEC chain at https://dnssec-analyzer.verisignlabs.com. SecDNS validates upstream; if it returns SERVFAIL the domain itself is broken.

Notes

For multi-WAN, pin DNS Resolver outgoing traffic to one WAN per gateway group to avoid asymmetric routing of port 853 traffic.

Frequently asked questions

Does pfSense support DoH instead of DoT?

Unbound on pfSense only supports DoT natively. For DoH install the pfBlockerNG plugin together with dnscrypt-proxy from the System, Package Manager, then point Unbound at 127.0.0.1.

Can I keep using pfBlockerNG?

Yes. pfBlockerNG enforces its block list locally before Unbound forwards the query. SecDNS still answers anything that escapes pfBlockerNG and feeds your central audit log.

Do I have to disable DNSSEC?

No. SecDNS performs DNSSEC validation upstream; Unbound can validate again locally. Leave DNSSEC enabled in DNS Resolver for defence in depth.

What if I run HA with CARP?

Configure DoT on the primary node, then run pfSense Config Sync so the secondary inherits the same Unbound settings. Failover preserves SecDNS forwarding.

How do I split policies between guest and main VLAN?

Create one SecDNS device per VLAN. In Unbound Advanced add a domain override or use views (community plugin) so each VLAN forwards to a different SecDNS upstream.