This section describes the DNS filtering mechanism.
If traffic matches a security policy that has a DNS filtering profile configured, the device extracts the domain name from the DNS request packet and sends the domain name to the DNS filtering process. Figure 1 displays the detailed DNS filtering process.
If no match of this domain name is found on the remote query server, the device processes the packet according to the control action for the "Other" category.
After being processed by the DNS filtering-based safe search function, search requests of users are directed to a search engine server that filters search results. The search engine server filters out pornographic and potentially risky content and returns search results to users, thereby regulating Internet access behavior of users.
The DNS filtering-based safe search function can be configured in pre-defined or user-defined mode. The pre-defined DNS safe search function can only be implemented for three search engines: Bing, Google, and YouTube. In addition, parameters such as the IP address of the safe search server, CNAME, and TTL in DNS response packets cannot be configured. To address these issues, implement the user-defined DNS safe search function to configure a rule of constructing DNS response packets. The pre-defined and user-defined DNS safe search functions are independent of each other, and the user-defined DNS safe search function takes precedence over the pre-defined DNS safe search function.
The DNS filtering-based safe search function is implemented after the DNS filtering process. After DNS filtering is complete, all DNS request packets excluding whitelisted or blocked packets are processed based on the safe search process. Figure 2 shows the safe search process.

The FW checks whether the pre-defined safe search function is enabled.
The FW checks whether the domain name is the domain name of Bing, Google, or YouTube.
The FW checks whether the current safe search domain name is in the DNS cache entries and within the validity period.
| Comparison Item | URL Filtering | DNS Filtering |
|---|---|---|
| Access control phase | Control the access when HTTP/HTTPS URL requests are initiated. | Control the access when domain names are resolved. |
| Control granularity | The control granularity is fine, to the directory and file levels. | The control granularity is coarse, to the domain name level. |
| Impact on performance | Great | Slight |
| Control scope | Only HTTP/HTTPS access is controlled. | All services corresponding to the domain name can be controlled. |
To sum up, DNS filtering is implemented for access control at an earlier stage than URL filtering and can effectively reduce HTTP packet traffic on the entire network. URL filtering, however, can control users' access to network resources in a more refined manner.
The FW provides DNS filtering- and URL filtering-based safe search functions. The comparison between the safe search functions is as follows:
The DNS fileting-based pre-defined safe search function can be implemented for Google, Bing, and YouTube. The DNS fileting-based user-defined safe search function can be implemented for user-defined search of website domain names and DNS response packets. The URL filtering-based safe search function can be implemented only for Bing, Google, Yahoo, Yandex, and YouTube.
To enable the DNS filtering-based pre-defined safe search function, you need to enable the safe search function in the DNS filtering profile. To enable the DNS filtering-based user-defined safe search function, you need to configure a rule for constructing DNS response packets in the DNS filtering profile. To enable the URL-based safe search function, you need to enable the safe search function in the URL filtering profile and configure the TCP proxy and SSL encrypted traffic detection.