Skip to content
Contents
GuidesOpenWrt

Lock Google SafeSearch with OpenWrt adblock while keeping OpenDNS filtering

A child's computer cannot open a blocked site, yet Google search settings can still be changed. OpenDNS filters domain categories. Locking SafeSearch also requires searches to use Google's enforced endpoint. Test each policy separately. This guide uses the 25.12 interface and assumes adblock, luci-app-adblock and a supported DNS backend.

Record your existing filtering result and enable one search provider

Note the DNS server on a test computer. Check a test domain you deliberately blocked in OpenDNS and see whether you can change SafeSearch in a new browser window. Verify that the browser uses the managed network resolver. If DHCP gives the client a public resolver directly, the client will miss rules generated locally by the router.

In LuCI, open Services → Adblock and find Enable SafeSearch. Record its previous value. Enable it, select only Google under Limit SafeSearch, and click Save & Reload. Wait for the update to finish. This version lets you select providers individually. Leaving the list empty uses the default group. If the fields are missing, check that adblock and its matching frontend are installed and that this version supports your DNS backend. Keep your existing OpenDNS upstream, allowlist and blocklist.

LuCI on the isolated OpenWrt router shows Enable SafeSearch selected and only google under Limit SafeSearch.

On the isolated OpenWrt 25.12.6 x86/64 router, adblock and its LuCI frontend were both 4.5.10-r1. After applying the change, run /etc/init.d/adblock status and check the search flag and last update. Local dnsmasq returned the same IPv4 address for www.google.com and the enforced endpoint. Neither AAAA query returned an address in that test. Look up current answers instead of hard-coding the sample IP. The lab used no household OpenDNS account. Verify category filtering and browser settings on a managed client.

Test DNS, the browser setting and your original policy

On the test computer, replace 192.168.1.1 with the router address. Repeat the checks for the Google country domain the client actually uses.

nslookup -type=A forcesafesearch.google.com 192.168.1.1
nslookup -type=A www.google.com 192.168.1.1
nslookup -type=AAAA www.google.com 192.168.1.1

Inspect Server and the answer. If a name is aliased, check the target. For address answers, compare the same record type at the same time, including AAAA for the enforced endpoint if needed. Start a new browser session and confirm on Google's SafeSearch settings page that filtering is managed and cannot be disabled. A successful IPv4 ping or an IPv6 address alone does not confirm enforcement. If DNS looks right but the setting can still be changed, check browser DNS, VPN, caches and the actual search hostname. Account or device management can also affect the result.

Recheck your original blocked domain and one allowed website on the same computer. To undo this change, restore the original SafeSearch switch and provider list, apply and repeat the three tests. Other subnets that share this DNS instance may also be affected. To restrict only children's devices, use a separate policy instance for them.

Trace DNS leaks after enabling DoH on OpenWrt

Explore hardware

Comments