Description | This article describes how to configure a FortiGate DNS server with the forward-only option and working details. |
Scope | FortiGate. |
Solution |
FortiGate can be set to forward the incoming DNS request to FortiGate's system DNS and apply the DNS filter at this level only. With this, all the DNS queries of LAN users can be scanned and only trusted categories are allowed to connect.
config system dns set primary 8.8.8.8 set secondary 4.2.2.2 end
Go to Network -> DNS servers and, under 'DNS Service on Interface', select Create new.
config system dns-server edit "port3" set mode forward-only set dnsfilter-profile "default" next end
If more than one network is connected with different interfaces, add all of them under DNS Servers.
config system dns-server edit "port3" set mode forward-only set dnsfilter-profile "default" next edit "port4" set mode forward-only set dnsfilter-profile "default" next end
config firewall policy edit 1 set name "dns" next end
If FortiGate is used as a DHCP server, push the IPs from the DHCP settings:
Now, when performing an nslookup for the trusted domain name, the DNS query will arrive at FortiGate and be forwarded to the DNS server. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.