Using pihole when connected via WireGuard - SOLVED

I know Tom prefers pfBlocker to piHole, but I have the latter and am pretty happy with it. All of my VLANs use it, running on a pi, for DNS and adblocking and all works really well.

I also have wireguard setup thanks to Tom and Christian for remote access (full tunnel) and that is also a beautiful thing.

I would like to be able to benefit from the pihole for adblocking when I’m surfing remotely via my WG VPN but can’t seem to figure out how to make that happen. I’ve tried setting up a FW rule on the WG tab to route all tcp/udp on port 53 to the IP of the piHole but that didn’t work. Since WG is not an interface with a DHCP server, I can’t designate the piHole as the DNS server for that “VLAN” since it isn’t a VLAN.

So I’m a bit stumped. Does anybody know what I’m doing wrong? Thanks in advance for any help.

In the Android client there is an input field called nameserver, where you would enter the IP address of the Pi-hole. If you are using it on a laptop, just add the following line to the [Interface] section of the config file:

DNS = <IP-ADDRESS>

1 Like

I feel so dumb now. That did the trick. I thought I had to do it at the firewall since the IP address of an incoming VPN client is a different subnet than the one where the pihole is. Much appreciate the guidance @bb77