{"id":1427,"date":"2019-08-27T04:39:01","date_gmt":"2019-08-27T10:39:01","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=1427"},"modified":"2022-05-08T16:19:00","modified_gmt":"2022-05-08T22:19:00","slug":"openwrt-safesearch","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/openwrt-safesearch\/","title":{"rendered":"OpenWRT + SafeSearch"},"content":{"rendered":"<p>I&#8217;ve got an OpenWRT router, and here&#8217;s how I configured it to enable safesearch on my home network.<\/p>\n<p>Update May, 2022: <strong>Not recommended<\/strong>. I upgraded my router to OpenWRT 21.02.3 and suddenly, all searches through google, bing, and duckduckgo stopped working. At first, I thought it was cloudflare&#8217;s 1.1.1.3 DNS that was broken, but I was wrong. Once I removed the cname entries from my router and restarted dnsmasq, searches started working again.<\/p>\n<pre>uci add dhcp cname\nuci set dhcp.@cname[-1].cname=\"www.google.com\"\nuci set dhcp.@cname[-1].target=\"forcesafesearch.google.com\"\nuci commit dhcp\n\nuci add dhcp cname\nuci set dhcp.@cname[-1].cname=\"www.bing.com\"\nuci set dhcp.@cname[-1].target=\"strict.bing.com\"\nuci commit dhcp\n\nuci add dhcp cname\nuci set dhcp.@cname[-1].cname=\"duckduckgo.com\"\nuci set dhcp.@cname[-1].target=\"safe.duckduckgo.com\"\nuci commit dhcp\n\nfor name in www.youtube.com m.youtube.com youtubei.googleapis.com youtube.googleapis.com www.youtube-nocookie.com ; do\n    uci add dhcp cname\n    uci set dhcp.@cname[-1].cname=\"$name\"\n    uci set dhcp.@cname[-1].target=\"restrict.youtube.com\"\n    uci commit dhcp\ndone\n\nservice dnsmasq restart\n<\/pre>\n<p>See the configuration:<\/p>\n<pre>grep -A2 cname \/etc\/config\/dhcp\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve got an OpenWRT router, and here&#8217;s how I configured it to enable safesearch on my home network. Update May, 2022: Not recommended. I upgraded my router to OpenWRT 21.02.3 and suddenly, all searches through google, bing, and duckduckgo stopped working. At first, I thought it was cloudflare&#8217;s 1.1.1.3 DNS that was broken, but I &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/openwrt-safesearch\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;OpenWRT + SafeSearch&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-1427","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=1427"}],"version-history":[{"count":8,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1427\/revisions"}],"predecessor-version":[{"id":1545,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1427\/revisions\/1545"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=1427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=1427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=1427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}