The SafeSearch mode offered by Google makes it possible to filter the search engine’s results by removing links to pornographic or violent content.
This feature may be helpful if children are to use your computer, smartphone or tablet.
The Bing and DuckDuckGo search engines or even YouTube offer something similar.
Today, many devices allow your children to go on the Internet (smartphone, game console, computer, tablet, etc.).
Some devices do not include a filtering feature or require an arduous configuration.
The purpose of this article is to be able to filter sexual or violent results thanks to your OPNsense router.
Nowadays, the Unbound DNS Server is priorily enabled instead of Dnsmasq. That said, adding a "Host override" is done in the same way.
Note: From now on, most Web browsers or Operating Systems can use DNS over HTTPS (DoH).
Using DoH defeats the interception of DNS queries and efforts to default filter the search engine results.
Interface = LAN
Protocol = TCP/UDP
Destination = any
Destination port range / from = DNS
Destination port range / to = DNS
Redirect target IP = Single host or network = 127.0.0.1
Redirect target port = DNS
Description = DNS redirection
Host = www
Domain = google.com
IP = 216.239.38.120
Description = forcesafesearch.google.com
Alias: Host = www / Domain = google.co.uk Alias: Host = www / Domain = google.ca Alias: Host = www / Domain = google.com.au
Alias: Host = www / Domain = google.ie
Alias: Host = www / Domain = google.co.nz
Note: Ideally, all of the many Google access domain names such as google.com.hk or google.hu should be added as aliases, a list of which can be found here - https://gist.github.com/danielpunkass/2029185 .
Host = duckduckgo
Domain = com
IP = 52.142.126.100
Description = safe.duckduckgo.com
Host = www Domain = bing.com IP = 204.79.197.220 Description = strict.bing.com
Host = www Domain = youtube.com IP = 216.239.38.120 Description = restrict.youtube.com Alias: Host = m / Domain = youtube.com Alias: Host = youtube / Domain = googleapis.com Alias: Host = youtubei / Domain = googleapis.com Alias: Host = www / Domain = youtube-nocookie.com
Note: Safe Search for YouTube: some safe content may be filtered or blocked.
Once the configuration of OPNsense is complete, one must clear the Operating System DNS cache as well as the the Web browser DNS cache.
On Windows:
ipconfig /flushdns
On macOS:
sudo killall -HUP mDNSResponder
sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache
On Linux
sudo nscd --invalidate=hosts
sudo systemd-resolve --flush-caches
sudo systemctl restart dnsmasq
sudo rndc flush
To flush the Web browser DNS cache, you should:
Finally, try searching for some adult content websites you may have heard of.
You can also try searching for scenes depicting violence on YouTube.