Force Google SafeSearch With Mikrotik RouterOS

Force Google SafeSearch On Mikrotik RouterOS

Force Google SafeSearch On Mikrotik RouterOS

So, you are blocking adult content, but are you forcing Safe Search?

Well Bing, Google and Youtube have made it easy for us. To enable this, here I present you these tasty one liners for your Mikrotik RouterOS device. These DNS entries will force your network clients to resolve to the ips of restricted safe search servers.

/ip dns static add regexp="^(.*)\?google\.com$" address="216.239.38.120" comment="safesearch"
/ip dns static add regexp="^(.*)\?bing\.com$" address="204.79.197.220" comment="safesearch"
/ip dns static add regexp="^(.*)\?youtube\.com$" address="216.239.38.120" comment="youtuberestricted"
/ip dns static add regexp="^(.*)\?youtube\.googleapis\.com$" address="216.239.38.120" comment="youtuberestricted"
/ip dns static add regexp="^(.*)\?youtubei\.googleapis\.com$" address="216.239.38.120" comment="youtuberestricted"
/ip dns static add regexp="^(.*)\?youtube-nocookie\.com$" address="216.239.38.120" comment="youtuberestricted"

Once you have done this, all browsing on the network will have safe search enabled in the browser by default.

3 Replies to “Force Google SafeSearch With Mikrotik RouterOS”

  1. [* Shield plugin marked this comment as “trash”. Reason: Failed GASP Bot Filter Test (checkbox) *]
    This is a topic which is close to my heart… Cheers! Where are your contact details though?

  2. I had issues with the import but changed it to the following which allowed entry through terminal or a import with a “.rsc” file

    /ip dns static
    add address=216.239.38.120 comment=safesearch regexp=”^(.*)\\\?google\\.com\$”
    add address=204.79.197.220 comment=safesearch regexp=”^(.*)\\\?bing\\.com\$”
    add address=216.239.38.120 comment=youtuberestricted regexp=”^(.*)\\\?youtube\\.com\$”
    add address=216.239.38.120 comment=youtuberestricted regexp=”^(.*)\\\?youtube\\.googleapis\\.com\$”
    add address=216.239.38.120 comment=youtuberestricted regexp=”^(.*)\\\?youtubei\\.googleapis\\.com\$”
    add address=216.239.38.120 comment=youtuberestricted regexp=”^(.*)\\\?youtube-nocookie\\.com\$”

Leave a Reply

Your email address will not be published. Required fields are marked *

*