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
- 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]
- 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]
- 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.ioso Unbound uses the correct TLS SNI. - 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.
- Apply Unbound changes. Click Save, then Apply Changes on the DNS Resolver page. Unbound restarts and begins forwarding DoT to SecDNS.
- 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.