Making searches safe

It’s possible to make YOUTUBE, GOOGLE and BING searches safe at the router if you are running Tomato.

Important points to note: The CNAME(s) for DNSMASQ require a HOSTS entry, the address= (line) should would, but it doesn’t, hence having to add an INIT script. You can do it all via addresses, but that means that the YOUTUBE search defaults to RESTRICT and RESTRICTMODERATE is not an option, as the IP address for both is the same. Note that the IP for both youtube and google are the same, it’s the CNAME that passes the information to the YOUTUBE search/domain-lookup so that things are restricted.

Administration/Scripts/Init

mkdir -p /tmp/etc/dnsmasq/hosts
echo "216.239.38.120 forcesafesearch.google.com
216.239.38.120 restrict.youtube.com
216.239.38.120 restrictmoderate.youtube.com
204.79.197.220 www.bing.com" > /tmp/etc/dnsmasq/hosts/custom

Advanced / DHCP/DNS

address=/forcesafesearch.google.com/216.239.38.120
address=/restrict.youtube.com/216.239.38.120
address=/restrictmoderate.youtube.com/216.239.38.120
address=/www.bing.com/bing.com/204.79.197.220
cname=www.youtube.com,restrictmoderatemoderate.youtube.com
cname=m.youtube.com,restrictmoderate.youtube.com
cname=youtubei.googleapis.com,restrictmoderate.youtube.com
cname=youtube.googleapis.com,restrictmoderate.youtube.com
cname=www.youtube-nocookie.com,restrictmoderate.youtube.com
cname=www.youtube.co.nz,restrictmoderate.youtube.com
cname=m.youtube.co.nz,restrictmoderate.youtube.com
cname=youtubei.googleapis.co.nz,restrictmoderate.youtube.com
cname=youtube.googleapis.co.nz,restrictmoderate.youtube.com
cname=www.youtube-nocookie.co.nz,restrictmoderate.youtube.com
cname=www.google.com,forcesafesearch.google.com
cname=www.google.co.nz,forcesafesearch.google.com