2

I'm currently renting a server where I installed PiHole and PiVPN. PiHole is a DNS sinkhole that I use for blocking ads, and the PiVPN allows all my devices thanks to OpenVPN to get all my traffic through a personal VPN to reach my PiHole.

On PC it's great, even for laptops, because battery life is enough to support the "keepalive packets" that allow OpenVPN to stay connected to my server even if I'm not using the internet directly.

However, on Android, it's the main problem, since I'm using a VPN 24/7, and my battery is melting like snow in the sun. So the question is the following: How can I set up an internal VPN that redirects DNS queries to my PiHole (my server got an IP address that corresponds to my personal DNS-PiHole)?

I know some applications can work like "that", like AdAway (for non-root smartphones) or NetGuard.

I'm by the way rooted, and already using AdAway which is making the job, but it's more for technical challenge battery management.

3
  • Is your PiHole server reachable without VPN? Because if not one "internal VPN" wouldn't be enough, you would need a second VPN to just reach your PiHole server (e.g. just for DNS traffic to the PiHole server). Finally the main question remains: what do you gain by using your PiHole server instead of AdAway or similar apps like Blokada?
    – Robert
    Commented Mar 15, 2021 at 10:25
  • If root is available, I prefer running dnscrypt on the device than relying on VPN. Commented Mar 15, 2021 at 14:10
  • Hi there, I don't even know how to do that (I mean, running a script on Android), I guess it's with adb command ? I read as well that each time you reboot your device, you will have to re-over-write DNS again, I'm wrong ?
    – user344991
    Commented Mar 15, 2021 at 14:12

1 Answer 1

0

From the OP's (now deleted) comment (with copyedit),

I finally find what I need, "DNS Change" or "DNS Override" are making the job. My problem is solved I guess, even if I don't like using apps which aren't open source.

You must log in to answer this question.