Repository navigation
Description
What is the issue?
In OSS tailscaled prior to 1.74.0 (last working version 1.72.1), I could resolve MagicDNS and tailnet FQDN's (*.ts.net) under the following setup. The changelog notes changes in this area in 1.74.0: https://tailscale.com/changelog#2024-09-12.
- OSS
tailscaledrunning with--accept-dns=false - App Store or Standalone macOS Tailscale app running with "Use Tailscale DNS settings" off
After updating OSS tailscaled to 1.74.0, I now must turn on Tailscale DNS in the App Store or Standalone Tailscale macOS app to get MagicDNS or tailnet FQDN's to resolve. Enabling --accept-dns on tailscaled 1.74.0 does not work to resolve MagicDNS names or tailnet FQDN's, even with the App Store or Standalone macOS Tailscale app not running.
This is undesirable as I need to use my local network's DNS server, with split DNS handling tailnet FQDN's. I only turn on Tailscale DNS when using an exit node.
Please note that tailscaled runs as root (brew services start tailscale), in case that's relevant.
Output from tailscaled 1.74.0 dns status command (with redactions):
Details
=== 'Use Tailscale DNS' status ===Tailscale DNS: enabled.
Tailscale is configured to handle DNS queries on this device.
Run 'tailscale set --accept-dns=false' to revert to your system default DNS resolver.
=== MagicDNS configuration ===
This is the DNS configuration provided by the coordination server to this device.
MagicDNS: enabled tailnet-wide (suffix = REDACTED.ts.net)
Other devices in your tailnet can reach this device at REDACTED.
Resolvers (in preference order):
(no resolvers configured, system default will be used: see 'System DNS configuration' below)
Split DNS Routes:
- ts.net. -> 199.247.155.53
- ts.net. -> 2620:111:8007::53
Search Domains:
- REDACTED.ts.net
=== System DNS configuration ===
This is the DNS configuration that Tailscale believes your operating system is using.
Tailscale may use this configuration if 'Override Local DNS' is disabled in the admin console,
or if no resolvers are provided by the coordination server.
Nameservers:
- REDACTED
- REDACTED
- REDACTED
- REDACTED
Search domains:
- home.arpa
[this is a preliminary version of this command; the output format may change in the future]
Please let me know what further info can be provided. Thank you!
Steps to reproduce
No response
Are there any recent changes that introduced the issue?
Updated OSS tailscaled (installed via brew) to 1.74.0 from 1.72.1
OS
macOS
OS version
macOS 14.6.1
Tailscale version
1.74.0
Other software
No response
Bug report
BUG-3104a4f350ae354f7eedcc95e4ce78e5b8da482124d9bbdb7feabf0f446a757f-20240913143438Z-a9cd88dd1f260627
Activity
adamfeldman commentedon Sep 13, 2024
Some additional debugging output. This is in a configuration where no macOS app is running, just tailscaled 1.74.0 with
--accept-dns=trueand MagicDNS enabled on the tailnet.adamfeldman commentedon Sep 13, 2024
This is in a configuration where
tailscaledis not running, but the Standalone macOS app v1.74.0 is. Things are working as expected, aside from the undesirable situation mentioned in the OP.adamfeldman commentedon Sep 14, 2024
Okay, so I am almost certainly wrong that
tailscaledwas ever enabling the resolution of tailnet FQDN's without--accept-dns=true. But here's what I found was not working for me in 1.74.0 after reinstalling 1.72.1 and comparing the output ofscutil --dnsacross 1.72.1 and 1.74.0.sudo brew service start tailscale(or the equivalent for 1.72.1) is used to runtailscaled. I followed these directions approximately to get 1.72.1 reinstalled throughbrew: https://cmichel.io/how-to-install-an-old-package-version-with-brew/ (you'll need to fix the broken formula by commenting out the completions bit in the install block).In the following configuration, 1.72.1 works as I desire: local DNS servers are hit first, and I can resolve tailnet FQDN's in the browser no problem.
In the following configuration, 1.74.0 does not resolve tailnet FQDN's, and the output of
scutil --dnsis very different from 1.72.1...it doesn't look happy to me...1.72.1: `/opt/homebrew/opt/[email protected]/bin/[email protected] up --accept-dns --accept-routes=false --shields-up
1.74.0:
/opt/homebrew/opt/tailscale/bin/tailscale up --accept-dns --accept-routes=false --shields-upagottardo commentedon Sep 16, 2024
Thanks for the ultra-detailed report, this really helps. Probably not what you were hoping to hear, but were you running both the Standalone variant and OSS
tailscaledat the same time? They are incompatible with each other. The two variants of the client write the DNS configuration to the system in different ways (the GUI client uses NetworkExtension.framework from Apple, the OSS one doesn't).adamfeldman commentedon Sep 16, 2024
Thanks @agottardo! I am running the macOS App Store variant and OSS
tailscaledat the same time. I did experiment with Standalone during troubleshooting but then reverted back to App Store 1.74.0.After filing the info above, I became suspicious that OSS
tailscalewas somehow talking to the macOS app, either/or Standalone and App Store.I did some more work to confirm that did not confuse my report above: I re-verified the differences shown in
scutil --dnsbetween 1.74.0 and 1.72.1: #13461 (comment). On 1.74.0, my browser is unable to resolve tailnet FQDN's with--accept-dns=true. No issue on 1.72.1.Notes on how I made sure the
tailscalecli wasn't talking to the macOS appThis further made me suspicious that the OSS tailscale cli was "being smart" and finding a way to connect to and control the macOS App......via some mechanism other than the socket...
...so I edited the service plist to use a different socket name, just to make sure:
roachcord3 commentedon Sep 18, 2024
For my part, I have just been installing with
go install(per the wiki) and I found that my Mac's ability to resolve tailscale DNS names is flaky. When it stops being able to resolve names, it seems to take a few minutes before it can do so again. Based on the output oftailscale dns statusnot matching my network's DNS settings, I decided to runtailscale set --accept-dns=false, and now I am not having this problem.I am not on Apple Silicon, am on Sonoma. I have the MagicDNS IP address simply added as my first DNS server via the network settings, and I don't have my tailnet set to override local DNS configs.
I don't know if this information will help you figure out the problem, but I figured that, at the very least, this should help show the problem isn't based purely on whether different installs of tailscale are messing with each other.
Edit: at some point since I posted this, the workaround stopped working, and resolution went back to being inconsistent. I hadn't even upgraded the version, so I think my workaround was just a fluke.
100xff commentedon Sep 18, 2024
I have this problem and have only this version of
tailscaleinstalled, not the standalone or App Store version.mistzzt commentedon Nov 6, 2024
I can confirm the same issue on tailscaled v1.76.1 from Nix on macOS 15.1. For me, manually creating a file of my domain under
/etc/resolver/fixes the issue. If you are using nix-darwin, then something like this helps:Wizr commentedon Dec 16, 2024
I've observed that MagicDNS doesn't work on macOS because files in
/etc/resolver/are not created. This occurs because cfg.MatchDomains is empty, which may be related to the implementation ofGetBaseConfigadded in a certain version. I'm not sure if these issues are connected, so feel free to disregard this if they're not.Stark-X commentedon Jan 7, 2025
macOS version:
15.2 (24C101)same issue
8 remaining items
chetan commentedon Jan 26, 2025
@roachcord3 strange that it doesn't work for you. I left the Tailscale address out of network settings and only added the resolver file as I mentioned. It should allow getting settings via dhcp but still resolve the tail net addresses.
roachcord3 commentedon Jan 27, 2025
@chetan your message got me curious, so I tried turning on
--accept-dns=true, then having macOS forget my network settings for one of the split band networks in my home, then connected to that network and didn't set anything manually in the system preferences for DNS, to see if perhaps something in my existing setup was getting in the way of the workaround you posted.With that having been done, my system preferences app says that I've got the same DNS settings that I would expect from my DHCP server (has the router as the DNS resolver, and no search domains, which I believe the DHCP server doesn't set, even though it does provide a
.landomain and I have traditionally added that as a search domain to my machines.)tailscale statuscomplains about not being able to talk to DNS, but I can still resolve names from both my tailnet and local network (note: I have split DNS and my local network's search domain set in the tailscale control panel online, but that was for the sake of my linux machines; I've been used to having to manually set up MagicDNS per the instructions that have been in the wiki all this time.) Even after flushing the DNS cache and HUPing themDNSResponderprocesses as you originally wrote about, I can still resolve those names, yettailscale statusis still complaining.dscacheutil -q host -a name <host>works butdns-sd -G v4 <host>ordns-sd -q <host>print some stuff that indicates the record is resolvable, but then they hang indefinitely. Very strange. It's also worth noting that whiletailscale statusis saying tailscale can't reach the configured DNS servers,tailscale dns statusisn't showing any warnings.I don't know if it'll end up being like my earlier "workaround" that just left me in a state where resolution was up to a coin flip, I'll have to report back later about that. But I figured I'd mention this behavior now in case it helps anyone else in this thread.
matt453 commentedon Feb 10, 2025
I encountered a similar issue whenever I used newer tailscaled versiosn on my macs. I could not get tailnet FQDNs or shorter machine names to resolve. but they worked everywhere else on my tailnet on other devices, ubuntu installs, standalone tailscale on mac or on iphone/ipad. if I went back to
v1.68.2it would start working again but I did not want to be stuck on such an old version.what finally worked for me on my MacOS Sequoia install with
v1.80.1was to go to:System Settings > Network > Wi-Fi (or however you connect) > Details > DNS
then add 100.100.100.100 to the DNS servers.
but also add my tailnet domain to the search domains. which finally gave me this kind of block with
scutil --dnsinstead of just the not reachable
search.tailscaleresolver in the regular DNS configuration.I had originally tried a lot of things from command line but ultimately only adding both via the Apple system Settings GUI ended up being what worked.
now both the tailnet FQDNs and machine names are resolving correctly in my browser as they do on any other machine in my net.
Wizr commentedon Mar 11, 2025
While I previously rebuilt the code based on my initial analysis, a quicker, though somewhat inelegant or even unstable, fix is to append a line
searchx(to trigger a parse error in tailscale) to/etc/resolv.conf. Note a restart oftailscaledis required.NicholasClooney commentedon Sep 29, 2025
Thanks! By adding that line to my
/etc/resolv.conffixed the MagicDNS for me!Mine looks like this now.
Update:
This works but need to update the file every time connecting to a network which
/etc/resolv.confgets overridden.I have applied the changes from this reply now #13461 (comment)
100.100.100.100as DNSmytailnet.ts.netas a search domainunderthestars-zhy commentedon Jan 11, 2026
any fix on this rn?
dan-dr commentedon Feb 1, 2026
Same here
zhiyozhao commentedon Feb 5, 2026
I got a temporary solution here:
Problem description:
When in gui version, everything good. When in oss/brew version, ip works good, magic dns not working.
Analysis && Solution:
scutil --dnsoutput of gui version and oss version, it turns out the oss version is not setting up dns nameserver correctly.# /etc/resolver/tailxxxx.ts.net nameserver 100.100.100.100Environment:
n8henrie commentedon Feb 28, 2026
Finally resolved related issues, macos 26.3, running tailscale from nixpkgs.
I had previously seen multiple files (some related to tailscale) in
/etc/resolver/and wasn't sure how those were being created, so I renamed the directory.I found that a round-trip of shutting down tailscale, tailscaled, and relaunching them recreated
/etc/resolver/and/etc/resolver/search.tailscale, but not the other files, and DNS was not working for my tailnet (in spite ofdscacheutil -flushcacheandsudo killall -HUP mDNSResponder).Interestingly, I found that deleting
/etc/resolv.confas well as/etc/resolver/seems to prompt tailscale to regenerate all the files in/etc/resolver/.Further,
/etc/resolv.confis just a symlink to/var/run/resolv.conf. One can regenerate/var/run/resolv.confby toggling wifi on and off (either via gui ornetworksetup -setairportpower en0 on).So the only step I haven't figured out is how to provoke regeneration of the
/etc/resolv.confsymlink, but that's easy enough to do manually:sudo ln -s /var/run/resolv.conf /etc/So, round trip, so you can see at which point each file is recreated and when dns starts working again:
GoMino commentedon Apr 3, 2026
On my side it was NordVPN causing issues, disconnecting from it, and ping started working again.
barnstar commentedon Jul 15, 2026
This should be addressed in 1.101.188 unstable (main/HEAD) - and will be included in the upcoming 1.102 release. We now shell out to scutil to configure DNS correctly in OSS tailscaled so MagicDNS works similar to the NETunnelProviderManager backed clients.