How to enforce Google, Bing and YouTube Safe Search

Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload
Author Message
miggalvez
DD-WRT Novice


Joined: 15 Dec 2016
Posts: 19

PostPosted: Fri Jan 06, 2017 4:32    Post subject: How to enforce Google, Bing and YouTube Safe Search Reply with quote
In order to force anyone on the network to use Google SafeSearch, Bing Family Filter, and Restricted (moderate) YouTube:

1. Add the attached host file to the JFFS directory.
2. Add addn-hosts=/jffs/host_safesearch.txt to Additional DNSMasq Options in Services tab.
3. Restart DNS. Go to Administration>Commands and run restart_dns or reboot the router.
Sponsor
numbsyd
DD-WRT Novice


Joined: 14 Jan 2017
Posts: 3

PostPosted: Sat Jan 14, 2017 9:45    Post subject: Re: How to enforce Google, Bing and YouTube Safe Search Reply with quote
miggalvez wrote:
In order to force anyone on the network to use Google SafeSearch, Bing Family Filter, and Restricted (moderate) YouTube:

1. Add the attached host file to the JFFS directory.
2. Add addn-hosts=/jffs/host_safesearch.txt to Additional DNSMasq Options in Services tab.
3. Restart DNS. Go to Administration>Commands and run restart_dns or reboot the router.



It worked brilliantly, thanks a billion.I tested using https as well, it forces safesearch. the information you shared helps lot of people. thanks again.
wavracer
DD-WRT Novice


Joined: 08 Mar 2011
Posts: 22
Location: Saskatchewan, Canada

PostPosted: Fri Feb 24, 2017 5:13    Post subject: Re: How to enforce Google, Bing and YouTube Safe Search Reply with quote
If you don't have JFFS available on the build of DD-WRT you are running, you can do the following 3 things for a pretty robust content filtering setup:

First, go to:

Setup > Basic Setup > Network Address Server Settings (DHCP) and set

Quote:
Static DNS 1 to 208.67.222.123
Static DNS 2 to 208.67.220.123


then 'Save' and 'Apply Settings' to use the OpenDNS FamilyShield nameservers.

https://www.opendns.com/setupguide/?url=familyshield

Second, go to:

Services > DNSMasq > Additional DNSMasq Options and add

Code:
strict-order
address=/www.google.com/216.239.38.120
address=/www.google.ca/216.239.38.120
address=/www.bing.com/204.79.197.220
address=/www.youtube.com/216.239.38.119
address=/m.youtube.com/216.239.38.119
address=/youtubei.googleapis.com/216.239.38.119
address=/youtube.googleapis.com/216.239.38.119
address=/www.youtube-nocookie.com/216.239.38.119


then 'Save' and 'Apply Settings' to force the OpenDNS FamilyShield nameservers to be used first and to force SafeSearch on for Google and Bing, and Restricted Mode on for YouTube (you can add your local Google URLs, or all of them if you wish).

Third, go to:

Administration > Commands > Command Shell and add (or 'Edit' and add)

Code:
iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)


then 'Save Firewall' to prevent the use of alternative DNS nameservers.

https://www.dd-wrt.com/wiki/index.php/OpenDNS

_________________
*Linksys WRT310N v2 with DD-WRT v24-sp2 (12/18/10) std-nokaid-small - build 15940
numbsyd
DD-WRT Novice


Joined: 14 Jan 2017
Posts: 3

PostPosted: Sun Feb 26, 2017 17:56    Post subject: Reply with quote
for some reason, when the router is restarted, file gets deleted from jffs2 folder.
bluzfanmr1
DD-WRT Novice


Joined: 11 Feb 2015
Posts: 36

PostPosted: Fri Apr 21, 2017 17:28    Post subject: Reply with quote
Thanks for posting this wavracer. I was looking for this solution and it works perfectly.

In my case, I was already using Open DNS and blocking any attempt to bypass the router plus I was running an ad blocking script. I just incorporated those addresses into the adblocking startup script and now the unwanted images are blocked as well.

_________________
Asus RT-AC66U_B1

***RIP***TRENDnet TEW-811DRU***FRIED***

dsr51234
DD-WRT Novice


Joined: 04 May 2017
Posts: 1

PostPosted: Thu May 04, 2017 1:19    Post subject: Reply with quote
I've tried the non-JFFS instructions, but was wondering if there's an easy way for me to double check that the settings are working?

From what I can tell they're not...
NorthantsPete
DD-WRT Novice


Joined: 05 Feb 2018
Posts: 21

PostPosted: Tue Dec 18, 2018 16:05    Post subject: Re: How to enforce Google, Bing and YouTube Safe Search Reply with quote
wavracer wrote:
If you don't have JFFS available on the build of DD-WRT you are running, you can do the following 3 things for a pretty robust content filtering setup:

First, go to:

Setup > Basic Setup > Network Address Server Settings (DHCP) and set

Quote:
Static DNS 1 to 208.67.222.123
Static DNS 2 to 208.67.220.123


then 'Save' and 'Apply Settings' to use the OpenDNS FamilyShield nameservers.

https://www.opendns.com/setupguide/?url=familyshield

Second, go to:

Services > DNSMasq > Additional DNSMasq Options and add

Code:
strict-order
address=/www.google.com/216.239.38.120
address=/www.google.ca/216.239.38.120
address=/www.bing.com/204.79.197.220
address=/www.youtube.com/216.239.38.119
address=/m.youtube.com/216.239.38.119
address=/youtubei.googleapis.com/216.239.38.119
address=/youtube.googleapis.com/216.239.38.119
address=/www.youtube-nocookie.com/216.239.38.119


then 'Save' and 'Apply Settings' to force the OpenDNS FamilyShield nameservers to be used first and to force SafeSearch on for Google and Bing, and Restricted Mode on for YouTube (you can add your local Google URLs, or all of them if you wish).

Third, go to:

Administration > Commands > Command Shell and add (or 'Edit' and add)

Code:
iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to $(nvram get lan_ipaddr)


then 'Save Firewall' to prevent the use of alternative DNS nameservers.

https://www.dd-wrt.com/wiki/index.php/OpenDNS



Thanks so much for this, this worked a treat!

Slowly feel like Im getting there!
NorthantsPete
DD-WRT Novice


Joined: 05 Feb 2018
Posts: 21

PostPosted: Mon Jun 10, 2019 9:40    Post subject: Reply with quote
Can we have this but for Twitter.
Ive found despite efforts, the kids just fire up Twitter app and away they go onto the porn tweets

I blocked the dns entires for media, however it blocks everything
I hear twittyer hasd a safe search but you have to turn it on
deezer
DD-WRT Novice


Joined: 13 Jan 2011
Posts: 1

PostPosted: Fri Nov 08, 2019 16:05    Post subject: Reply with quote
[quote="NorthantsPete"]Can we have this but for Twitter.
Ive found despite efforts, the kids just fire up Twitter app and away they go onto the porn tweets

I blocked the dns entires for media, however it blocks everything
I hear twittyer hasd a safe search but you have to turn it on[/quote]

You can use cleanbrowsing or OpenDNS as your DNS server in DD-WRT to block Twitter altogether. You might also want to check out a service like CovenantEyes for your families devices.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum