Hacker News new | ask | show | jobs
by Sohcahtoa82 2336 days ago
> 3. Works everywhere (Pi-hole is very cool but only works within the local network you set it up, AFAIK)

I run a PiHole on an AWS EC2 instance, then VPN to it on my phone. The VPN is configured so that only DNS requests get sent to it and all other traffic just goes straight through the LTE connection so that I'm not paying for all the traffic through AWS.

1 comments

Could you please elaborate on your setup. How do you achieve sending only DNS traffic over VPN? What do you do when your phone is connected to your home WiFi network?
> How do you achieve sending only DNS traffic over VPN?

I use OpenVPN on both my phone and the server with the "redirect-gateway def1 bypass-dhcp" option enabled on the server. See https://docs.pi-hole.net/guides/vpn/only-dns-via-vpn/

> What do you do when your phone is connected to your home WiFi network?

Nothing. The phone still uses the PiHole in AWS. I don't run a PiHole on my home network, as I use uBlock Origin to block ads on my desktop. I make my phone use a PiHole to prevents apps that aren't my web browser from getting ads, such as Google Now.