How to Change DNS on OPNsense
By [FILL IN], [FILL IN] · Last updated
OPNsense uses Unbound; configure query forwarding.
Before you start
You need a FirewallDNS account (see pricing). Sign in to your dashboard, register your public IP address and copy your DNS server addresses. Replace <FIREWALLDNS-PRIMARY> and <FIREWALLDNS-SECONDARY> below with them.
Step by step
- System > Settings > General: add <FIREWALLDNS-PRIMARY> and <FIREWALLDNS-SECONDARY>. Untick "Allow DNS server list to be overridden by DHCP/PPP on WAN".
- Services > Unbound DNS > Query Forwarding: enable "Use System Nameservers" or add the FirewallDNS servers explicitly.
- Services > ISC DHCPv4 > LAN: DNS servers empty (use OPNsense) or set FirewallDNS.
- Add a NAT port forward redirecting LAN DNS to the firewall.
Verify it works
- Renew DHCP on a client (Windows:
ipconfig /renew, macOS: reconnect Wi-Fi). - Run
nslookup example.comand check which server answered. - Open the live log in your dashboard. New lookups should appear within seconds.