I have a homelab which hosts multiple services
I use reverse proxy to access all these services, I access them with a domain I own, i.e. NameOfService.mydomain.com
One such service I run is AdguardDNS (a DNS server)
I have added this DNS server as the only DNS server that the clients on my OpenWRT router uses:
Interfaces > Lan > DHCP Server > Advanced Settings > DHCP Options > "6, IP Of MY DNS Server"
All of my devices including my server run tailscale, this is what my tailscale DNS config looks like:
The DNS records for
*.mydomain.com
point to the tailscale IP address of my serverI have "rewritten" my DNS records on my local DNS server to point my domain to the local IP address of my server
Therefore, I can access my services via the same domain, even if I am connected to tailscale or if I am on my routers network without tailscale
My Questions:
-
How can I get my tailnet devices to use the SAME dns server of my local DNS whilst also being able to access
*.mydomain.com
on both my tailnet and my router? -
(Optional) The OpenWRT DHCP server collects devices hostsnames and adds them to the default internal OpenWRT DNS server, how can I also have these hostnames on my DNS configuration (since im using my own DNS Server), i.e. so I can ping my devices again,
ping iphoneSE
?
Solutions I have tried:
- Using tailscale splitDNS for my domain (so
*.mydomain.com
uses a public DNS server) and the rest of my tailscale DNS queries using my ADGuardDNS server hosted on my homelab (which is on my tailnet)- Result: The latency when ONLY querying
*.mydomain.com
was quite high, reached > 2000ms when quering those domains consecutively multiple times, I am open to suggestions on fixes for this
- Result: The latency when ONLY querying