-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Home Assistant OS cannot resolve Tailscale hostnames #310
Comments
I missed the obvious. You can add Still though, this should probably be mentioned in the docs somewhere as this usually isn't necessary on other platforms |
Well, that doesn't fix it. Is DNS just fundamentally broken when running Supervised?
fallback: false
host: 172.30.32.3
llmnr: true
locals:
- dns://192.168.178.1
- dns://100.100.100.100
mdns: true
servers: []
update_available: false
version: 2023.06.2
version_latest: 2023.06.2
{
"servers": [],
"locals": [
"dns://192.168.178.1",
"dns://100.100.100.100"
],
"fallback": false,
"debug": false
} And yet this is what I get when running the commands:
Honestly, I'm out of ideas here. In my limited understanding, the secondary DNS server should respond if the first one doesn't know the answer, the second one get's asked, and so on... |
It would seem that CoreDNS takes the NXDOMAIN response from the first DNS server and goes "Job done!". So unless I set Luckily, Tailscale's MagicDNS can be used as the primary DNS. However, now I run into the problem that the supervisor needs to be restarted after a reboot for the DNS resolution to work correctly as the Tailscale Add-On is started later on in the startup chain. Also, I've only been able to get Tailscale hostname resolution working when using static ip address settings in Home Assistant where the DNS is setup as Trying to use DHCP and run Is there a more elegant way to have Tailscale DNS resolution work on Home Assistant OS? |
@david-kalbermatten did you find a solution to this? The current add-on version doesn't seem to preference MagicDNS in userspace or kernel mode. |
You'd strike the same issue if you were using Tailscale in a container (addon-tailscale) and then expecting it to work in another container (homeassistant / "core") - DNS config does not natively span across multiple containers. Plausibly you could also run two, or more, VPN's and strike the same issue of which to choose. I agree that this should be mentioned in the documentation as, while it appears to be supported by virtue of it's inclusion in the config area, it does not work out of the box (which is probably preferable). |
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. |
I think this issue is still unresolved. |
Yes, but since the Tailscale IPs are static from what I can tell, I have a workable solution at least :/ |
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. |
Problem/Motivation
DNS lookup doesn't work for Tailcale hostnames like
machine.weird-name.ts.net
. This is inconvenient as I would like to use Tailscale's MagicDNS to reference a remote server for shares and other resources by its hostname which doesn't work with how the Add-On is setup currently.Expected behavior
If MagicDNS is running, one would expect the Home Assistant OS to be able to resolve Tailscale's MagicDNS.
Actual behavior
When running
nslookup machine.weird-name.ts.net
in the SSH console of Home Assistant, it cannot resolve the name.However, running the same command after manually inserting the contents ofDoesn't seem to work that way/etc/resolv.conf
from the tailscale container into the host's version, works just fine.Steps to reproduce
1. Fresh install of Home Assistant OS2. Install Tailscale Add-On
3. Install SSH Add-On
4. Try to resolve the domain name from a Tailscale machine like
machine.weird-name.ts.net
=> Doesn't work5. Copy the contents of
/etc/resolv.conf
from the docker container of the Tailscale Add-On into the hosts version of the file6. Try to run the command from step 5 again => Works now
This doesn't seems to have been the case, please refer to the comments further down
Proposed changes
I'm not 100% sure whether this can be done with just a simple config change as the
map
parameter seems rather restrictive. But ideally, you'd want the Tailscale version of/etc/resolv.conf
to overwrite the host's version when running Tailscale inuserspace_networking: false
using a volume bind.The text was updated successfully, but these errors were encountered: