Problem: Wireguard obfuscates DNS request, so all DNS lookups from devices connected via VPN are seen as coming from Wireguard server. This prevents me from setting up per-device DNS white/black lists.
Entering IP of internal DNS server as DNS in Wireguard profile does not work (nothing resolves) despite access to that IP through VPN.
Do I need to set DNS server as one of Wireguard clients for it to work? How to do it properly if DNS and Wireguard are hosted at same server under same IP?
Setup
Client device: some crappy half-obsolete Android
Server: Rasbperry Pi with Raspbian hosting PiHole and Wireguard inside of Docker.
Full story:
I have a Wireguard VPN setup in my home network. Everything works fine and I can access all the goodies with just single open port, yay for not having to secure all the apps.
One of the goodies is internal DNS server, PiHole, with direct access (no router acting as intermediate DNS) so server sees all devices separately which allows me to tinker around with per-device whitelist.
This is important feature to me as I have to use some badly written applications which crash when some google spy service is not available. Everything works fine inside of local network, with PiHole nicely distinguishing each device, but once connected through VPN PiHole sees DNS requests as originating from Wireguard server.