Categories: Router TricksSecurity

How to Force Google Safe Search on DD-WRT

Other Posts Worth Reading

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

Using WP-CLI to Access MySQL Running in A LAMP Docker Container

WP-CLI is a great command line tool to help you manage Wordpress. I had trouble…

1 month ago

Dunzip – Download and Unzip in Linux With One Command

Tired of downloading zip or tar files, decompressing, and then having to delete the compressed…

2 months ago

Backing Up an SD Card or Hard Drive to A VHD File (Virtual Hard Disk)

  The Microsoft Virtual Hard Disk - An Ideal Backup Image Format Microsoft's Virtual Hard…

2 months ago

Ultimate Ad-Free Browsing

Browser getting cluttered with Ads ? Want to achieve a nearly total ad-free browsing experience…

7 months ago

How to Monitor Your Home Remotely With Skype

Want to peek in on your dog ? Have an elderly parent or friend that…

8 months ago

Freedom from Ads with Pi-Hole and Macvlan

Block Ads to Your Entire Network Using Pi-Hole Pi-Hole is a fantastic ad-blocking software that…

8 months ago