Local DNS search suffix?

My setup is as follows:
1 container running Ubuntu 20.04 on proxmox running tailscale as a subnet router. Configured as an exit-node with subnet access to my entire LAN
1 Windows 11 client connected and using tailscale host as an exit node

Everything works pretty good. I can access all of my internal stuff via IP address. I have verified that my internet traffic is routing through the subnet router.

The only problem is that I cannot access other servers on my LAN by hostname only. I can access them by IP address and by hostname... Weirdly enough, though, if I do nslookup on the hostname, it resolves to the LAN IP of that device.

What am I missing?

Additional info: I am running pihole for DHCP/DNS.

The only problem is that I cannot access other servers on my LAN by hostname only. I can access them by IP address and by hostname… Weirdly enough, though, if I do nslookup on the hostname, it resolves to the LAN IP of that device.

Does “servers on my LAN” mean servers attached to the LAN which are not running Tailscale directly, and instead are reachable via the subnet router?

Tailscale doesn’t know anything about the nodes attached to the LAN, so MagicDNS won’t populate records for them.

I’d suspect that nslookup works because it turns into a multicast DNS request on the local LAN. systemd-resolved will do this, for example. mDNS would only work from devices attached to that LAN segment, not remote Tailscale nodes coming in via the subnet router.

Does “servers on my LAN” mean servers attached to the LAN which are not running Tailscale directly, and instead are reachable via the subnet router?

Yes, I mean devices on my local network that I’m trying to access via a “subnet router”.

So, for example, I have a host on my local network called portainer. If I ping portainer, it doesn’t resolve. If I do nslookup portainer, it resolves the IP of 10.10.10.22. If I ping portainer.mylocal.domain it pings. If I do nslookup 10.10.10.22, it resolves the hostname portainer.mylocal.domain.

What’s weird is I am able to access them via hostname fine from my Android phone today. I can ping portainer, and it pings portainer.mylocal.domain and it resolves to 10.10.10.22.

I’m not using magic DNS. I’m telling tailscale to override my DNS and I have it using my local LAN DNS as a global nameserver. So, I would expect my DNS request to go to my local DNS server and resolve the IP address from the hostname. And if I can put the FQDN of the host on my LAN it resolves. So, if we had the option to add DNS search suffixes, I assume I could configure my local domain there and it would resolve it.

If I’m understanding the situation correctly, adding a SplitDNS server at Tailscale for mylocal.domain pointing to your local LAN DNS server is likely to do what you’re looking for. It will add mylocal.domain as a search domain.

If you want the local LAN DNS server to be reachable from outside the home, installing Tailscale on it and using the Tailscale IP address for the Split DNS server address would be a way to do so.

I thought I had tried that, but apparently not. After setting split DNS, it seems to be working as I would expect. When I ping the hostname, it appends my local domain and I can ping it. I can also access services directly via hostname instead of FQDN. (I had assumed that if I used split DNS, I would have had to have specified the FQDN for it to go to my LAN DNS server).