Description | This article describes how to use the DNS filter profile to filter and minimize Internet usage by interrupting client DNS queries. |
Scope | FortiGate |
Solution |
Internet access to the different network segments is restricted by using security profiles such as web filters and application control.
Since web filter and DNS filter domain categories are similar, DNS filter can be used to block unwanted, non-productive, or untrusted domain access at the client DNS lookup itself.
The common approach of DNSfilter profile in FortiGate policies.
Scenario 1: All the client machines are configured with a public DNS server.
For example:
There are two different network segments, LAN and WIFI, allowed to access the internet with different access restrictions:
The respective DNS filter profile is called in the LAN to WAN and WIFI to WAN policy.
Now DNSFilter blocks domain access for the LAN and WIFI users based on domain categories blocked in the respective DNSfilter profile.
Scenario 2: All the client machines are configured with a local DNS server and the DNS server is using Public DNS as a forward DNS server. In this case, the DNS filter should be applied in the client-to-local DNS server policy and not in the DNS server to the Internet or Forward DNS server IP policy.
This is because if DNSFilter is applied in the local DNS server to the internet policy, then the action set for the FortiGuard Category in the applied DNSFilter will be applicable for all the DNS communication between them.
The DNS server will cache this DNS response and also resolve the respective domain name to "Redirect Portal IP" for all the users. With this, it will not be possible to achieve different security and access restrictions for the different users.
The best approach in this scenario is to create user/different network segment security policies and apply the DNS filter with necessary categories being blocked as per security and access restrictions for the segment.
For example:
Policy ID 2 allows DNS communication from local DNS to the Forward DNS server; no DNSfilter is applied here to avoid DNS cache of the local DNS server being updated with 'Redirect Portal IP'. Policy 5 and 6, created for LAN network to DNS server and WIFI network to DNS server communication, and respective DNSfilter profile is applied. If the DNS filter is not blocking the access, then policies 6 and 7 will allow the client to connect the domain/website which is further inspected by other UTM profiles. |