FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
vshtaloja
Staff
Staff
Article Id 416492
Description

This article describes the behavior where FortiGate DNS servers do not currently support wildcard (*) entries in secondary or shadow zones, or in DNS database forwarding configurations. Although wildcard entries can be stored, FortiGate does not interpret them dynamically, so queries for subdomains do not match the wildcard and may return an 'unknown host' response.

Scope FortiOS v7.2, FortiOS v7.4, FortiOS v7.6.
Solution

Administrators may try to use a wildcard domain in the FortiGate DNS database to:

  • Resolve subdomains of an internal domain, or:

  • Forward DNS queries for multiple domains without changing system-wide DNS.

 

Example scenario:

  • Primary DNS contains a wildcard A-record:

 

*.subdomain.local → 10.10.10.50

 

FortiGate DNS servers will store the wildcard record, but:

  • In secondary/shadow DNS, wildcard records only resolve if queried exactly as stored.

  • In DNS database forwarding, wildcard entries are treated as literal names rather than applying to all subdomains.

 

Verification:

  • To verify, check the DNS database using:


diagnose test application dnsproxy 8

 

  • To test resolution from the FortiGate:


execute ping anything.subdomain.local  -----> It will return Unable to resolve hostname.

 

Currently, this is considered a New Feature Request.

 

Workarounds:

 

  1. Forward queries for the Specific Domains:

 

config system dns-database
    edit "subdomain.local"
        set authoritative disable
        set forwarder 10.10.10.10
    next
end

 

Queries for all subdomains of subdomain.local will be resolved correctly by the primary DNS server.

 

  1. Add Explicit A-Records.

If only a few subdomains are required, manually add entries in the FortiGate DNS database:

 

config system dns-database
    edit "subdomain.local"
        config dns-entry
            edit "app.subdomain.local"
                set type A
                set ip 10.10.10.50
            next
        end
    next
end

 

Note: It is not suitable for large or dynamic sets of subdomains.