FortiGate DNS Error: Causes and Fixes That Work
In this article
A FortiGate DNS error usually means the firewall cannot reach its configured DNS servers, so DNS filtering and FortiGuard lookups fail while traffic still passes. Test the servers, fix the DNS configuration, and allow DNS out of the firewall itself, and most errors clear within minutes.
Time 20 min · Steps 8 · Level Medium
Fixing a FortiGate DNS Error in Eight Steps
- Check what DNS servers are set. In the web console go to Network > DNS (labels can differ slightly by FortiOS version). Note whether the firewall is using the FortiGuard DNS servers or custom ones, and whether the source interface is correct.
- Confirm the error is real. Run a DNS test from the firewall CLI:
diagnose sniffer packet any 'port 53' 4in one session, thenexecute nslookup google.comin another. If no packets leave or no reply returns, the firewall itself cannot resolve. - Ping the DNS servers. Run
execute ping 8.8.8.8and ping each configured server address. If pings fail, the problem is routing or an outage, not DNS settings. - Test on the right interface. If the firewall has multiple WAN links, test from the interface named in the DNS configuration. A DNS server reachable only through one ISP will fail when the firewall sends the query out the other.
- Check the local firewall policy. Traffic from the firewall's own interface to the outside is controlled by a local-in policy. Run
diagnose firewall proute listand check that DNS traffic from the FortiGate's own address is permitted out the intended WAN interface. - Switch servers to rule out an outage. Temporarily set the DNS servers to two well-known public resolvers in Network > DNS, save, and run
execute nslookup example.comagain. If resolution now works, the original servers were the problem. - Verify DNS service status. Run
diagnose debug application dnsproxybriefly or check the DNS database under Network > DNS Servers to see whether the proxy is running and which servers are marked as reachable. - Clear caches and confirm. Flush the DNS cache with
diagnose test application dnsproxy 3, then resolve several names from a client behind the firewall and from the firewall itself. Consistent success means the error is resolved.
Which FortiGate DNS Error Do You Have?
Most DNS errors on a FortiGate fall into a handful of patterns, and each one points to a different fix. Match your symptom to the row before changing anything, so you do not mask the real cause.
| Symptom | Likely cause | How to confirm | Fix |
|---|---|---|---|
| Clients browse by IP but not by name | Firewall DNS servers unreachable | execute nslookup from the firewall fails | Replace or restore DNS servers in Network > DNS |
| "DNS filter errors" or blocked-category failures in logs | FortiGuard DNS rating unreachable | FortiGuard license and connectivity test fails in System > FortiGuard | Fix the FortiGuard connection or switch the DNS filter to a reachable resolver |
| Some domains resolve, others never do | Split DNS or DNS database override | Network > DNS Servers shows a zone entry for the failing domain | Correct or remove the DNS database entry for that zone |
| Resolution works then stops for about a minute | One dead server in the list, slow failover | Sniffer trace shows queries to one server with no reply | Remove the dead server or fix its route |
| Only VPN or guest users affected | DNS set per-interface or per-VPN scope, not globally | Compare client DNS settings with Network > DNS | Set correct servers in the interface or VPN DHCP scope |
| Errors after a policy or route change | DNS traffic now routed out a different WAN | diagnose firewall proute list shows new path | Pin DNS traffic to the working WAN with a policy route |
Quick Checks Before You Change Anything
Two minutes of checking saves a wrong fix. Work down this list in order, because each check rules out a whole class of causes.
- Is the error on the firewall itself, or only on clients behind it? Test both with
execute nslookupfrom the firewall and annslookupfrom a client. - Does the FortiGuard status page show all services green? A red DNS rating server explains category errors without touching your DNS settings.
- Did anything change recently? A new WAN link, a changed policy route, or an ISP switch is the most common trigger.
- Is the DNS source interface correct in Network > DNS? On dual-WAN firewalls this single field causes a large share of errors.
- Can the firewall ping each DNS server by address? If not, DNS settings are not the problem.
Keeping FortiGate DNS Working After the Fix
Once DNS is healthy, a few habits keep it that way. Set at least two DNS servers on different networks so one outage does not stop name resolution, and pin DNS traffic to a specific WAN interface with a policy route if you run dual WAN. If you rely on FortiGuard DNS filtering, check the FortiGuard status page after any routing change, because the rating traffic can silently take a different path than ordinary DNS. For internal names, keep the DNS database entries under Network > DNS Servers accurate, and remove zones you no longer use, since a stale zone entry will override public resolution for that domain. After firmware upgrades, re-check Network > DNS, since settings occasionally migrate differently than expected.
What if only FortiGuard DNS errors appear?
If ordinary resolution works but DNS filter categories fail, the firewall is reaching your DNS servers but not the FortiGuard rating servers. Check System > FortiGuard for the DNS service status, confirm the license is active, and verify the firewall can reach FortiGuard over the expected port. If your network blocks that path, the DNS filter can be pointed at a resolver that handles rating differently, or the filter can be relaxed until connectivity is restored.
Can a FortiGate DNS error block all internet access?
Yes, in two cases. If a DNS filter profile is set to block unmatched or errored queries, a failed FortiGuard lookup becomes a block rather than a pass, so every new domain fails. And if clients use the FortiGate as their DNS server, a broken DNS database or dead upstream servers stop resolution for everyone. In both cases the traffic path is fine; only name lookup is broken, which is why browsing by IP address still works.
Why does DNS fail only for VPN users?
VPN clients usually get their DNS servers from the VPN scope or DHCP settings, not from Network > DNS. If that scope lists an internal server the client cannot reach over the tunnel, every lookup fails. Set the VPN scope to servers reachable through the tunnel, or add a DNS database entry so the FortiGate answers internal names directly for those clients.
Official source: Fortinet Documentation