Categories: Router TricksSecurity

How to Force Google Safe Search on DD-WRT

Try Oone of These Two Methods to Force Google Safe Search

These two methods will enforce Google’s safesearch on all computers on your network (keep in mind that this won’t work for cell phones or other devices using cellular data). This is specific to any router using the DDWRT firmware. DDWRT is an open source firmware that is available to be flashed on a number of routers (check the DDWRT website for a list of compatible routers and installation details)

Method #1 of Forcing Google’s Safe Search – Rewrite DDWRT’s Hosts File on Startup

The simplest way to do this is to have your router edit your hosts file on each startup as follows:

  1. Go to Administration->Commands

  2. Click “Edit” and add the following script:
    
    
    echo '216.239.38.120 www.google.com  
    216.239.38.120 encrypted.google.com 
    216.239.38.120 google.com' >> /etc/hosts
    restart_dns
    
    
    
  3. Click “Run Commands”
  4. Click “Save Startup”
  5. Done!

What does this do ? It redirects those urls to the ip address of forcesafesearch.com. Your hosts file will be wiped out on every reboot of the router but the script will restore the settings.

While this is a very easy way of forcing safesearch, the disadvantage is that Google could change the ip address of safesearch. In addition, this method doesn’t permit wild cards.

Method #2 of Forcing Google SafeSearch- Use DNSMasq

This method permits wildcards:

  1. Make sure that you have DNS masq enabled.
  2. Services->Additional DNSMasq option Box.
  3. Insert the following (Note the DOT before google.com, the dot acts as a wild card to pickup any subdomains):

    local=/local/
    expand-hosts
    address=/.google.com/216.239.38.120

  4. It should look like this:

  5. Click "Save" (button bottom of page)
  6. Click "Apply Settings"
  7. Done! If it doesn't work right away you may need to reboot the router (use the button on the Services tab)
Charlie

Recent Posts

KeePassXC Password Manager – Use Auto-Type Instead of the KeePassXC Plugin

Avoiding Browser Plugins with KeePassXC KeePassXC is a popular free open source password manager. As…

3 years ago

A Simple Step to Delete Thousands of Useless Gmail Messages and Free Up Space

If you've had a Gmail account for years, like I have, at some point you…

3 years ago

Back Up Your Raspberry Pi Virtually

Here's a little trick I use to back up my Raspberry Pi without having to…

4 years ago

Unclutter Your GMail Without Missing Out On Your Newsletters

I try to keep my email inbox fairly clean but I do subscribe to some…

4 years ago

Windows Reinstall: Use Secret Migration Tool to Restore All Settings Even If Option Disabled; Plus Tips to Restore Programs After a Clean Install

I was recently faced with the dreaded prospect of re-installing Windows 10. While the standard…

4 years ago

Pi-hole & Unlimited Whitelist for OpenDNS, Cleanbrowsing, Etc.

Pi-Hole and Upstream DNS Providers Pi-hole is an excellent whole-home, self-hosted ad blocker and DNS…

4 years ago