Because the phone's OS sets this by default.
You'd have to reason with OnePlus why their phones do that.
This is good as long as your phone is connected to your home wifi network.
It may not work when you connect your phone to a different wifi network or to mobile data, as your Pi-hole is available on your home network only.
That's an interesting thought.
Off the top of my head, I wouldn't know how pihole-FTL
(Pi-hole's embedded dnsmasq
) would react to stating multiple identical IPv4 addresses as DNS DHCP option, but you can certainly give this a try.
You'd need to create a custom configuration for dnsmasq
, e.g.
sudo nano /etc/dnsmasq.d/42-multi-dhcp-dns.conf
and add the following line:
dhcp-option=option:dns-server,0.0.0.0,0.0.0.0
Note that Pi-hole's DHCP server will translate 0.0.0.0
to its host machine's current IPv4 address for clients requesting that option via DHCP.
Verify your configuration is still valid:
pihole-FTL dnsmasq-test
If it doesn't come back OK, check the file content for typos.
Then apply the settings to your Pi-hole by running:
pihole restartdns