Please follow the below template, it will help us to help you!
Expected Behaviour:
Hetzner VPS:
- Ubuntu 20.04
- Hetzner VPS 1 Core 2GB RAM
Home Network:
- RaspberryPi
Hi! I'll start with describing my current set-up.
Hetzner VPS:
- Hosting a Wireguard Server with my clients connecting to it. The catch is, that one Client is using two IP Subnet ranges. 192.168.88.0/24 for the Wireguard connection and 192.168.0.0/24 for my home network. This is needed, so that all my clients can connect from anywhere in the world to my homenet and reach all devices within 192.168.0.0/24
- Hosting PiHole with dnsmasq and listening on all local Interfaces
Raspberry Pi - Home network:
- Using a docker container to connect via wireguard to my Hetzner VPS
- Hosting various apps, all being SSL Secured through traefik.
- Since everything is SSL secured, i have Cloudflare as a DNS with a wildcard certificate (Example: service.pi.mydomain.com)
- This local RaspberryPi is also equipped with a PiHole installation which serves only clients in my home network, here are also local DNS Entries, pointing the various service.pi.mydomain.com entries to their respective IPs (traefik handles the reverse dns stuff)
Expected behaviour:
Being on my home network, i can just enter the DNS service.pi.mydomain.com and access all services which are hosted on my raspberrypi with valid SSL Certs.
The same should happen when i am connected to my Wireguard VPN. Entering the DNS and being rerouted to my home network.
When being at home:
*Client -> Pihole Local DNS -> Reroute to IP (ex. 192.168.0.45) -> Traefik -> Access to the service
When connected to Wireguard:
*Client -> DNS through Wireguard (192.168.88.1 -> Hetzner VPS dnsmasq) -> Reroute to IP (ex. 192.168.0.45) -> going through wg0 interface -> Home network traefik instance -> Access to the service
Actual Behaviour:
Once i am not home anymore, and i want to connect to those services through the wireguard connection, the DNS entry won't work. Doing a nslookup on the Hetzner VPS also doesn't bring up any results. Nothing is being found. And yes, the PiHole installation on the Hetzner VPS does have the local DNS entries.
When i use a local IP like 192.168.88.4 on the local DNS entry in the Hetzner VPS PiHole instance (service.pi.mydomain.com -> 192.168.88.4), the nslookup command finds the entry
Maybe a DNS-Rebind protection somewhere??
I have done some tcpdumps, listeing on port 53 (dnsmasq port) on my Hetzner VPS, when doing the request in the browser, i do not see any activity.
This kind of makes sense, since the error message from the browser pops up almost instantly "Site was not found"
I can connect to my services typing the IP and Port directly into the browser (while being connected to the VPN) so there must be a problem with DNS Resolution, since the direct connection can be made.
Debug Token:
No Debug Token yet. Maybe this can be solved without sharing sensitive information ![]()