Guest User!

You are not Sophos Staff.

SafeSearch - Enforcement when using the DPI Engine

Disclaimer: This information is provided as-is for the benefit of the Community. Please contact Sophos Professional Services if you require assistance with your specific environment.

During the webcast on November 14, 2019 there was the following question and answer:

Q: Web filtering using TLS interception not Web Proxy - will safesearch be possible using the TLS interception feature in the future?

A: Safesearch, depending on the content provider, does still require the proxy. We are looking to add specific hosts in XG to make it easy to define proxy policies for those specific sites. In that way, you can rely on DPI and TLS for everything else, and use the proxy for the specific safe search sites. For Google at least, there are safe search enforcement alternatives which do not require the firewall e.g. inserting a DNS record into your DNS server.


I wanted to give instructions on how to enforce SafeSearch in Google and Bing, as well as YouTube restrictions when using DPI mode web filtering.

Google, Bing, and Yahoo provide a mechanism for proxies to enforce SafeSearch using header manipulation.
Google and Bing provide a mechanism for proxies to enforce SafeSearch using DNS manipulation. YouTube provides a mechanism for restricted mode.

In XG, if you use the web proxy, you can enforce SafeSearch by editing the Web Policy and selecting the "Enforce SafeSearch" checkbox. This will enable the DNS manipulation (which works with or without HTTPS decryption), as well as header manipulation when HTTPS is being decrypted.

In XG, if you use the DPI mode web filtering, SafeSearch cannot be enforced. The DPI engine cannot change IP Address the client is connecting to, nor can it manipulate headers.

However administrator can still enforce SafeSearch by changing the resolution on the DNS server that clients on your network are using.  This might be the XG, AD server, router, or other DNS server that your network uses. Using a DNS CNAME means that clients trying to resolve DomainA will always get the answer to DomainB, which is good if the IP address for DomainB ever changes. However we have noticed that these domains have existed for years and the IPs have never changed. Therefore if a CNAME is not possible, you can use just resolve to the SafeSearch IPs directly.


Google
Change the DNS entry for the following domains to be a CNAME for forcesafesearch.google.com.
www.google.com
Country specific Google domains (www.google.com/supported_domains)
More Information: support.google.com/.../186669

Bing
Change the DNS entry for the following domains to be a CNAME for strict.bing.com.
www.bing.com
More Information: help.bing.microsoft.com/

YouTube
Change the DNS entry for the following domains to be a CNAME for restrict.youtube.com or restrictmoderate.youtube.com
www.youtube.com
m.youtube.com
youtubei.googleapis.com
youtube.googleapis.com
www.youtube-nocookie.com
More Information: support.google.com/.../6214622

 

Steps if you are using the XG as the DNS resolver on your clients:
Go to Network, DNS, Add DNS host entry.
For the domain name put in the domain to be overridden (eg www.google.com).
For the IP address put the IP of the CNAME domain (eg 216.239.38.120)



Updated Disclaimer
[edited by: Erick Jan at 1:48 PM (GMT -7) on 17 Apr 2023]
Parents Reply Children
  • BenjaminMiller said:

    Will the adding specific hosts be ready for when v18 reaches a GA stage or will this come in a later release. We have different safe search policies for users, depending on their age and the time of day they are accessing so changing the DNS globally is not an option for us.

    It will be added in EAP3.  There is a new FQDN Host Group containing hosts of all the search engines.  You can then create a firewall rule that only applies to those hosts, and which uses the web proxy that supports configuring as part of the Web Policy that is in 17.5.  The later firewall rules that apply to other traffic can still use the DPI Engine.