Fortinet black logo

Administration Guide

DNS filter

DNS filter

You can apply DNS category filtering to control user access to web resources. You can customize the default profile, or create your own to manage network user access and apply it to a firewall policy, or you can add it to a DNS server on a FortiGate interface. For more information about configuring DNS, see DNS.

DNS filtering has the following features:

  • FortiGuard Filtering: filters the DNS request based on the FortiGuard domain rating.
  • Botnet C&C domain blocking: blocks the DNS request for the known botnet C&C domains.
  • External dynamic category domain filtering: allows you to define your own domain category.
  • DNS safe search: enforces Google, Bing, and YouTube safe addresses for parental controls.
  • Local domain filter: allows you to define your own domain list to block or allow.
  • External IP block list: allows you to define an IP block list to block resolved IPs that match this list.
  • DNS translation: maps the resolved result to another IP that you define.

DNS filtering connects to the FortiGuard secure DNS server over anycast by default. For more information about this configuration, see DNS over TLS and HTTPS.

In FortiOS 6.4, the DNS proxy daemon handles the DNS filter in flow and proxy mode policies. Starting in 7.0, the IPS engine handles the DNS filter in flow mode policies and queries the FortiGuard web filter server for FortiGuard categories. In proxy mode, the DNS proxy daemon handles the DNS filter and queries the FortiGuard SDNS server for FortiGuard categories. When a DNS filter profile is enabled in config system dns-server, the DNS proxy daemon handles the traffic.

Note

Some features of this functionality require a subscription to FortiGuard Web Filtering.

Note

DNS filter profiles cannot be used in firewall policies with NGFW policy-based mode; see Profile-based NGFW vs policy-based NGFW for more information. They can be used in the DNS server; see FortiGate DNS server for more information.

FortiGuard DNS rating service

DNS over TLS connections to the FortiGuard secure DNS server is supported. The CLI options are only available when fortiguard-anycast is enabled. DNS filtering connects to the FortiGuard secure DNS server over anycast by default.

To configure DoT to the secure DNS server in the CLI:
config system fortiguard
    set fortiguard-anycast enable
    set fortiguard-anycast-source fortinet
    set anycast-sdns-server-ip 0.0.0.0
    set anycast-sdns-server-port 853
end

The following topics provide information about DNS filters:

DNS filter

You can apply DNS category filtering to control user access to web resources. You can customize the default profile, or create your own to manage network user access and apply it to a firewall policy, or you can add it to a DNS server on a FortiGate interface. For more information about configuring DNS, see DNS.

DNS filtering has the following features:

  • FortiGuard Filtering: filters the DNS request based on the FortiGuard domain rating.
  • Botnet C&C domain blocking: blocks the DNS request for the known botnet C&C domains.
  • External dynamic category domain filtering: allows you to define your own domain category.
  • DNS safe search: enforces Google, Bing, and YouTube safe addresses for parental controls.
  • Local domain filter: allows you to define your own domain list to block or allow.
  • External IP block list: allows you to define an IP block list to block resolved IPs that match this list.
  • DNS translation: maps the resolved result to another IP that you define.

DNS filtering connects to the FortiGuard secure DNS server over anycast by default. For more information about this configuration, see DNS over TLS and HTTPS.

In FortiOS 6.4, the DNS proxy daemon handles the DNS filter in flow and proxy mode policies. Starting in 7.0, the IPS engine handles the DNS filter in flow mode policies and queries the FortiGuard web filter server for FortiGuard categories. In proxy mode, the DNS proxy daemon handles the DNS filter and queries the FortiGuard SDNS server for FortiGuard categories. When a DNS filter profile is enabled in config system dns-server, the DNS proxy daemon handles the traffic.

Note

Some features of this functionality require a subscription to FortiGuard Web Filtering.

Note

DNS filter profiles cannot be used in firewall policies with NGFW policy-based mode; see Profile-based NGFW vs policy-based NGFW for more information. They can be used in the DNS server; see FortiGate DNS server for more information.

FortiGuard DNS rating service

DNS over TLS connections to the FortiGuard secure DNS server is supported. The CLI options are only available when fortiguard-anycast is enabled. DNS filtering connects to the FortiGuard secure DNS server over anycast by default.

To configure DoT to the secure DNS server in the CLI:
config system fortiguard
    set fortiguard-anycast enable
    set fortiguard-anycast-source fortinet
    set anycast-sdns-server-ip 0.0.0.0
    set anycast-sdns-server-port 853
end

The following topics provide information about DNS filters: