OPNsense 25.7 DNS Issues: Migrating from Unbound to dnsmasq
Complete guide to resolving DNS resolution failures after upgrading to OPNsense 25.7, including step-by-step migration from Unbound to dnsmasq for improved stability and local hostname resolution in home networks.
If youβve recently upgraded to OPNsense 25.7 and are experiencing intermittent DNS resolution failures, youβre not alone. Many users have reported issues where websites become unreachable, then mysteriously work again after cache flushes or reboots. The culprit? Changes in how DNS services interact in the new version.
In this post, Iβll walk you through the issues introduced in OPNsense 25.7 and show you how to migrate from the problematic Unbound setup to a more stable dnsmasq configuration.
π¨ What Changed in OPNsense 25.7?
OPNsense 25.7 introduced several significant changes that have disrupted previously stable DNS configurations:
π Default DHCP Service Switch
The most significant change is that dnsmasq became the default DHCP service instead of ISC DHCP. While this change improves performance and simplifies configuration for most users, it has created compatibility issues with existing Unbound DNS setups.
π Unbound DNS Resolution Issues
Users are reporting widespread DNS resolution failures with symptoms including:
- Intermittent βserver not foundβ errors in browsers
 - Lag and timeouts when accessing websites
 - Local hostname resolution failures (devices canβt resolve each other by name)
 - Cache flush temporarily fixes issues but problems return
 
The issues appear to affect both:
- Fresh installations of OPNsense 25.7
 - Upgraded systems from previous versions
 
π Understanding the Root Cause
The problems stem from several interrelated issues:
- DHCP Service Migration: The switch from ISC DHCP to dnsmasq broke existing DNS registration workflows
 - Unbound Instability: The new version of Unbound has compatibility issues with the changed DHCP environment
 - Configuration Mismatches: Previous configurations that worked fine now conflict with the new service architecture
 
π Impact on Local DNS
One of the most frustrating issues is the complete failure of local hostname resolution. In previous versions, devices like laptop.local or server.internal would resolve automatically. After the upgrade, these lookups fail entirely, requiring manual IP address management.
π οΈ Solution: Migrate to dnsmasq for DNS
The most effective solution is to configure dnsmasq as both the DHCP and DNS service, replacing Unbound entirely. This provides:
- β Stable DNS resolution without random failures
 - β Automatic local hostname registration for DHCP clients
 - β Simplified configuration with fewer moving parts
 - β Better integration with the new DHCP service
 
π Step-by-Step Migration Guide
π― Step 1: Disable Unbound DNS
First, we need to disable the problematic Unbound service:
- Navigate to Services β Unbound DNS β General
 - Uncheck βEnableβ to disable Unbound
 - Change the Listen Port from 
53to53053(weβll use this later if needed) - Apply the changes
 
π― Step 2: Configure dnsmasq for DNS
Now weβll set up dnsmasq to handle DNS resolution:
- Go to Services β Dnsmasq DNS & DHCP β General
 - Enable dnsmasq by checking the βEnableβ box
 - Set Listen Port to 53 (the standard DNS port)
 - Configure the following settings:
- Interface: LAN (and other internal interfaces) - Interfaces to serve DNS requests
 - Do not forward to system DNS: β Checked - Forces manual DNS server configuration
 - DHCP fqdn: β Checked - Enables automatic local domain registration
 - DHCP default domain: 
internal- Local domain name for your network - DHCP register firewall rules: β Checked - Automatically creates firewall rules
 
 - Apply the configuration
 
π― Step 3: Configure Upstream DNS Servers
Set up external DNS servers for internet resolution:
- Go to Services β Dnsmasq DNS & DHCP β Domains
 - Add a new domain entry:
 
| Field | Value | Description | 
|---|---|---|
| Domain | * | Matches all domains | 
| IP Address | 1.1.1.1 | Cloudflare DNS (or your preferred DNS) | 
| Port | 53 | Standard DNS port | 
- Add additional upstream servers for redundancy:
8.8.8.8(Google DNS)9.9.9.9(Quad9 DNS)
 
π― Step 4: Configure DHCP Ranges
Set up DHCP ranges with automatic DNS registration:
- Go to Services β Dnsmasq DNS & DHCP β DHCP ranges
 - Add a range for your LAN:
 
| Field | Value | Example | 
|---|---|---|
| Interface | LAN | Your main network interface | 
| Start address | 192.168.1.100 | First IP in DHCP range | 
| End address | 192.168.1.199 | Last IP in DHCP range | 
| Domain | lan.internal | Local domain for this range | 
| Lease time | 86400 | 24 hours (in seconds) | 
- Apply the configuration
 
π― Step 5: Update System DNS Settings
Configure OPNsense to use the new DNS setup:
- Go to System β Settings β General
 - Remove any existing DNS servers
 - Add your dnsmasq instance: 
127.0.0.1 - Uncheck βAllow DNS server list to be overridden by DHCP/PPP on WANβ
 - Apply changes
 
π§ͺ Testing the New Configuration
β Test Internet Resolution
From a client device, test external DNS resolution:
1
2
nslookup google.com
ping cloudflare.com
β Test Local Hostname Resolution
Test automatic hostname registration:
1
2
3
# From one device, try to reach another by hostname
ping laptop.lan.internal
nslookup server.lan.internal
β Verify DHCP Registration
- Check Services β Dnsmasq DNS & DHCP β Log
 - Look for DHCP lease entries showing hostname registration
 - Verify clients receive correct DNS server (should be your OPNsense LAN IP)
 
π§ Advanced Configuration Options
π― Configure Local Host Overrides
For devices that need static DNS entries:
- Go to Services β Dnsmasq DNS & DHCP β Hosts
 - Add static entries:
 
| Field | Value | Example | 
|---|---|---|
| Host | nas | Hostname | 
| Domain | lan.internal | Local domain | 
| IP addresses | 192.168.1.50 | Static IP | 
π― Set Up Custom DNS Blocking
For ad-blocking or content filtering:
- Go to Services β Dnsmasq DNS & DHCP β Domains
 - Add blocking entries:
 
| Field | Value | Description | 
|---|---|---|
| Domain | ads.example.com | Domain to block | 
| IP Address | 127.0.0.1 | Redirect to localhost | 
π¨ Troubleshooting Common Issues
π DNS Resolution Still Failing
If youβre still experiencing issues:
- Check firewall logs for blocked DNS traffic
 - Verify DHCP clients are getting correct DNS server
 - Flush DNS cache on client devices
 - Restart dnsmasq service from Services menu
 
π Local Hostnames Not Resolving
For local name resolution problems:
- Verify DHCP fqdn is enabled
 - Check that clients are sending hostnames in DHCP requests
 - Ensure domain is configured in DHCP ranges
 - Review dnsmasq logs for registration messages
 
π AdGuard Home Integration Issues
If youβre using AdGuard Home:
- Configure AdGuard to use upstream DNS servers instead of OPNsense
 - Point DHCP clients directly to AdGuard instead of dnsmasq
 - Use separate ports to avoid conflicts
 
π Performance Comparison
| Metric | Unbound (25.7) | dnsmasq | 
|---|---|---|
| Stability | β Frequent failures | β Reliable | 
| Local DNS | β Broken | β Automatic | 
| Configuration | π‘ Complex | β Simple | 
| Memory Usage | π‘ Higher | β Lower | 
| Startup Time | π‘ Slower | β Faster | 
π Reverting if Needed
If you need to revert to Unbound:
- Disable dnsmasq DNS (set Listen Port to 0)
 - Re-enable Unbound (Services β Unbound DNS β General)
 - Restore Unbound to port 53
 - Reconfigure upstream DNS servers in Unbound settings
 
π§ Final Thoughts
The DNS issues in OPNsense 25.7 are frustrating, but the migration to dnsmasq provides a more stable and feature-rich solution. The automatic hostname registration and simplified configuration make network management much easier.
Key benefits of the migration:
- π― Eliminates random DNS failures
 - π Restores local hostname resolution
 - β‘ Improves overall network performance
 - π§ Simplifies ongoing maintenance
 
While the upgrade disruption is inconvenient, the end result is a more robust DNS infrastructure thatβs better suited for home and small business networks.
The community feedback suggests that this configuration is not only more stable but also aligns better with OPNsenseβs direction for future releases. Many users report that after making this switch, their networks are more reliable than they were even before the 25.7 upgrade.
