Situation: I am running a Raspberry Pi connected to the home router. Pihole is running as a filter on the Raspberry. The router serves the Rasp as the local DNS for local devices, let's say 192.168.178.20. The network settings on the Rasp are configured so that search queries to Google and YouTube are mandatorily redirected to the server with the restricted module:
/etc/dnsmasq.d/05-restrict.conf
# YouTube Restricted
cname=www.youtube.com,restrict.youtube.com
cname=m.youtube.com,restrict.youtube.com
cname=youtubei.googleapis.com,restrict.youtube.com
cname=youtube.googleapis.com,restrict.youtube.com
cname=www.youtube-nocookie.com,restrict.youtube.com
# Google SafeSearch
cname=www.google.com,forcesafesearch.google.com
cname=www.google.co.uk,forcesafesearch.google.com
# Bing Family Filter
cname=www.bing.com,strict.bing.com
# DuckDuckGo
cname=www.duckduckgo.com,safe.duckduckgo.com
cname=duckduckgo.com,safe.duckduckgo.com
/etc/hosts
[default entries]
216.239.38.120 restrict.youtube.com
216.239.38.119 restrictmoderate.youtube.com
216.239.38.120 forcesafesearch.google.com
204.79.197.220 strict.bing.com
34.243.144.154 safe.duckduckgo.com
Problem: I want to activate parental controls on my children's smartphones (e/OS, Android 14). As soon as this happens, the DNS entry 192.168.178.20 is overwritten in the phones. The phones use all.dns.mullvad.net as DNS by default. This can't be changed and creates an unwanted bypass around Pihole.
Attempted solution:
Entry in /etc/dnsmasq.d/05-restrict.conf
cname =all.dns.mullvad.net,raspberrypi
in /etc/hosts
192.168.178.20 raspberrypi
In addition, all.dns.mullvad.net is blocked in Pihole.
When I ping all.dns.mullvad.net on a Linux machine in the same network, I get a response from 127.0.0.1
(which surprises me a little, as I would have expected 192.168.178.20).
However, the cell phones show that they cannot contact all.dns.mullvad.net. Therefore, they have no network connection.
I also made the bold attempt to assign the public IPv4 address of all.dns.mullvad.net to the eth0 device of the Raspberry Pi. This is possible, but it does not change anything.
My strategy is probably wrong, or I have misunderstood something. Does anyone have any tips on how I can close the bypass around Pihole and still allow the children's cell phones to connect to the internet? I need to somehow trick the cell phones into thinking they are connecting to all.dns.mullvad.net...
Addition: I could not figure out if the cell phones maybe use the public IPv6-address of all.dns.mullvad.net as static route. This would explain why my attempts didn't work...
/etc/dnsmasq.d/05-restrict.conf
# YouTube Restricted
cname=www.youtube.com,restrict.youtube.com
cname=m.youtube.com,restrict.youtube.com
cname=youtubei.googleapis.com,restrict.youtube.com
cname=youtube.googleapis.com,restrict.youtube.com
cname=www.youtube-nocookie.com,restrict.youtube.com
# Google SafeSearch
cname=www.google.com,forcesafesearch.google.com
cname=www.google.co.uk,forcesafesearch.google.com
# Bing Family Filter
cname=www.bing.com,strict.bing.com
# DuckDuckGo
cname=www.duckduckgo.com,safe.duckduckgo.com
cname=duckduckgo.com,safe.duckduckgo.com
/etc/hosts
[default entries]
216.239.38.120 restrict.youtube.com
216.239.38.119 restrictmoderate.youtube.com
216.239.38.120 forcesafesearch.google.com
204.79.197.220 strict.bing.com
34.243.144.154 safe.duckduckgo.com
Problem: I want to activate parental controls on my children's smartphones (e/OS, Android 14). As soon as this happens, the DNS entry 192.168.178.20 is overwritten in the phones. The phones use all.dns.mullvad.net as DNS by default. This can't be changed and creates an unwanted bypass around Pihole.
Attempted solution:
Entry in /etc/dnsmasq.d/05-restrict.conf
cname =all.dns.mullvad.net,raspberrypi
in /etc/hosts
192.168.178.20 raspberrypi
In addition, all.dns.mullvad.net is blocked in Pihole.
When I ping all.dns.mullvad.net on a Linux machine in the same network, I get a response from 127.0.0.1
(which surprises me a little, as I would have expected 192.168.178.20).
However, the cell phones show that they cannot contact all.dns.mullvad.net. Therefore, they have no network connection.
I also made the bold attempt to assign the public IPv4 address of all.dns.mullvad.net to the eth0 device of the Raspberry Pi. This is possible, but it does not change anything.
My strategy is probably wrong, or I have misunderstood something. Does anyone have any tips on how I can close the bypass around Pihole and still allow the children's cell phones to connect to the internet? I need to somehow trick the cell phones into thinking they are connecting to all.dns.mullvad.net...
Addition: I could not figure out if the cell phones maybe use the public IPv6-address of all.dns.mullvad.net as static route. This would explain why my attempts didn't work...
Last edited:

