A
A
AkZwork2020-02-17 19:04:00
Web development
AkZwork, 2020-02-17 19:04:00

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

4 answer(s)
H
hint000, 2020-02-18
@hint000

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

K
ky0, 2020-02-17
@ky0

Add rules to the firewall to redirect all DNS requests to your server and spoof the address in response packets.

K
Karpion, 2020-02-18
@Karpion

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.

G
Georg Gaal, 2020-02-19
@gecube

If these programs use DoH or DoT, then nothing will help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question