Troubleshooting for DNS filter

If you have trouble with the DNS filter profile in your policy, start with the following troubleshooting steps:

Checking the connection between the FortiGate and FortiGuard SDNS server

You need to ensure the FortiGate can connect to the FortiGuard SDNS server. By default, the FortiGate uses UDP port 53 to connect to the SDNS server.

To check the connection between the FortiGate and SDNS server:
  1. Verify the FortiGuard SDNS server information:

    # diagnose test application dnsproxy 3
    SERVER_LDB: gid=6f00, tz=-420, error_allow=0

    The SDNS server IP address might be different depending on location (in this example, it is

  2. In the management VDOM, check the communication between the FortiGate and the SDNS server:

    #execute ping
  3. Optionally, you can check the communication using a PC on the internal network (this example uses dig).

    1. Disable the DNS filter profile so that it does not affect your connection check.

    2. Ping your ISP or a public DNS service provider's DNS server, for example, Google's public DNS server of

      #dig @

      Or, specify the SDNS server as a DNS server:

      #dig @
    3. Verify that you can get a domain A record from the DNS server. This shows that the UDP port 53 connection path is not blocked.

      #dig @
      ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 35121
      ;; Flags: qr rd ra; QUERY: 1; ANSWER: 3; AUTHORITY: 0; ADDITIONAL: 0
      ;;            IN      A
      ;; ANSWER SECTION:       289     IN      CNAME 51        IN      A 51        IN      A
      ;; Received 129 B
      ;; Time 2019-04-29 14:13:18 PDT
      ;; From in 13.2 ms

Checking the FortiGuard DNS rating service license

The FortiGuard DNS rating service shares the license with the FortiGuard web filter, so you must have a valid web filter license for the DNS rat