Categories: Router TricksSecurity

2 Methods to Force Google Safe Search on DD-WRT All The Time for All Computers on Network

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 – 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 – 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

Pi-Hole Easy: Using Docker with Macvlan To Block Ads Without Taking Over Your Server

Pi-Hole is a fantastic ad-blocking software that can run on a Raspberry Pi or pretty…

1 hour ago

DIY Covid 19 Masks from A&M University Biomedical Engineering

A team consisting of Texas A&M University faculty and graduate students in the Biomedical Engineering…

3 days ago

Generating a Random Post in WordPress Using Shortcodes Ultimate

Shortcodes Ultimate by Vladimir Anokhin is a popular plugin for Wordpress supplying numerous helpful shortcodes…

1 month ago

How to Get A Year’s Access to Thousands of Top Line Computer Books, Courses, and Live Seminars for $75

O'Reilly Media is that iconic media publisher most well known for its books having covers…

2 months ago

Fixing BCD Boot Problems After a Blue Screen of Death in Windows 10

Occasionally in Windows 10 when a Blue Screen of Death (or "BSOD") occurs similar to…

2 months ago

How to Tell Whether DNS Is Using Local Configuration Files or Router

I've setup Pihole recently which is an in-network DNS server which is designed to block…

2 months ago