Answer the question
In order to leave comments, you need to log in
How to redirect Google DNS to yours?
Good afternoon.
I use Pi-Hole on a VPN server. Requests from many Google apps (with the exception of, for example, Youtube and a couple of others) do not go through my DNS set on the phone, but through internal ones in the application. Is there any way I can route requests through my DNS without Google's?
Answer the question
In order to leave comments, you need to log in
iptables -A PREROUTING -s 192.168.0.0/16 ! -d 192.168.0.0/16 -p udp --dport 53 -j DNAT --to-destination 192.168.11.11
192.168.11.11 - your DNS address
Add rules to the firewall to redirect all DNS requests to your server and spoof the address in response packets.
On a computer or on any router on the way to the Internet - you need to put the IP address 4.4.4.4 (or whatever Google DNS uses there) on any network interface. And place on the same system a DNS server serving client requests.
If this solution is too powerful (i.e. affects those who do not need to be affected), then ky0 wrote everything correctly. Only I would add that "static NAT" is needed there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question