Skip to content

macOS: DNS forwarder's DoH/UDP upstream dials are routed into the tunnel after wake from sleep, stalling all DNS for minutes #21154

Open

Description

@jia-pylon

What is the issue?

Summary

After every wake from sleep, once the Mac re-associates to Wi-Fi and gets DHCP, the forwarder's dials to its upstream resolvers (DoH on :443, DoT on :853, and UDP) are sourced from the node's Tailscale IP and enter the tunnel instead of leaving via the default interface. tailscaled logs them as open-conn-track: timeout opening ... no associated peer node. Because "Override DNS servers" makes 100.100.100.100 the system's only resolver, every DNS lookup on the machine stalls until the forwarder times out and fails over. The misrouted dials continue for 1.5 to 4.5 minutes after each wake, then stop on their own.

Wi-Fi association, DHCP, and the OS path are not the problem: on the sampled wake the OS reported the path satisfied 8 s after wake, and Tailscale itself reported health(warnable=network-status): ok and derp-2 connected at the same second.

Timeline of one wake (2026-09-08, local time)

10:35:05.0  kernel wake; airportd driver available
10:35:09.4  tailscaled LinkChange: default route "" -> en0 (link-local only)
10:35:11.4  configd DHCP en0: BOUND
10:35:13.0  configd publish success { IPv4, DNS, DHCP }
10:35:13.0  tailscaled control: setPaused(false); LinkChange major, rebinding; HaveV4 false->true
10:35:13.0  tailscaled health(warnable=network-status): ok
10:35:13.0  tailscaled dns: OScfg: {Nameservers:[100.100.100.100 fd7a:115c:a1e0::53] SearchDomains:[...]}
10:35:13.1  tailscaled magicsock: derp-2 connected; connGen=1
10:35:13.3  symptomsd NWPath: kNetworkPrimary NWPathStatusSatisfied en0
10:35:16.0  tailscaled control: NetInfo{... udp=true derp=#2}
10:35:19.9  open-conn-track: timeout opening (TCP 100.107.36.61:54277 => 1.1.1.1:443); no associated peer node
10:35:19.9  open-conn-track: timeout opening (TCP 100.107.36.61:54278 => 1.1.1.1:853); no associated peer node
10:35:19.9  open-conn-track: timeout opening (TCP [fd7a:115c:a1e0::cb38:243e]:59334 => [2606:4700:4700::1111]:853); no associated peer node
10:35:20.2  open-conn-track: timeout opening (TCP 100.107.36.61:54279 => 1.0.0.1:443); no associated peer node
...
10:39:06.4  open-conn-track: timeout opening (TCP [fd7a:115c:a1e0::cb38:243e]:61069 => [2001:4860:4860::8844]:443); no associated peer node
10:39:21.9  open-conn-track: timeout opening (TCP 100.107.36.61:61717 => 8.8.4.4:853); no associated peer node
10:39:22.1  open-conn-track: timeout opening (TCP 100.107.36.61:61723 => 8.8.8.8:443); no associated peer node
10:39:54.6  last open-conn-track line of this wake cluster

Counts of open-conn-track lines per minute for the same day show the same clustering at each wake: 09:01 (89 lines), 09:38-09:40 (120), 10:11 (69, dark wake), 10:35-10:39 (153).

Evidence that the dials really are black-holed

Routing table after wake has ifscope'd cloned host routes for the upstreams on the tunnel interface, while the unscoped lookup is correct:

$ netstat -rn -f inet | grep -E "^(default|1\.1\.1\.1|1\.0\.0\.1|8\.8\.8\.8|8\.8\.4\.4) "
default            172.18.104.1       UGScg   en0
default            link#23            UCSIg   utun5
1.0.0.1            link#23            UHWIig  utun5
1.1.1.1            link#23            UHWIig  utun5
8.8.4.4            link#23            UHWIig  utun5
8.8.8.8            link#23            UHWIig  utun5

$ route -n get 8.8.8.8            -> interface: en0, gateway 172.18.104.1
$ route -n get -ifscope utun5 8.8.8.8 -> interface: utun5, flags <UP,HOST,DONE,WASCLONED,IFSCOPE,IFREF,GLOBAL>

Reproducing the misrouted dial by hand: a TCP connect sourced from the Tailscale IP hangs for the full 75 s kernel timeout; the same connect from the default interface completes in 50 ms.

$ time nc -z -w 6 -s 100.107.36.61 8.8.8.8 443      # real 75.00s, no connection
$ time nc -z -w 6 8.8.8.8 443                      # succeeded, real 0.05s

Forwarder counters (tailscale debug metrics, lifetime of this tailscaled)

dns_query_local                 167057
dns_query_fwd                   166863
dns_query_fwd_success           158154
dns_query_fwd_doh               327194
dns_query_fwd_doh_error_transport 161628   # 49% of DoH attempts
dns_query_fwd_udp               48457
dns_query_fwd_udp_error_write   45795      # 94% of UDP attempts (v6 upstreams on a v4-only LAN)
dns_query_fwd_udp_success         855

At steady state each system lookup produces two DoH attempts (Google + Cloudflare raced) and exactly one of them fails at the transport layer every time, so queries still succeed. During the post-wake window both providers are dialed into the tunnel and the query stalls until the forwarder gives up.

Expected

Upstream dials from the forwarder should always be bound to the default (physical) interface, never enter the tunnel, and should not depend on how recently the link changed.

Workaround

tailscale set --accept-dns=false plus /etc/resolver/<tailnet>.ts.net (and split domains) pointing at 100.100.100.100. With that, 0 of N public lookups reach the forwarder and DNS is normal after wake. The tailnet-wide alternative (turning off "Override DNS servers") also avoids it but changes DNS for every user.

Possibly related

Steps to reproduce

  1. macOS node in a tailnet with MagicDNS on and "Override DNS servers" on (global nameservers Google + Cloudflare), no exit node, IPv4-only Wi-Fi.
  2. Sleep the Mac for 20+ minutes, wake it, let Wi-Fi reconnect.
  3. Watch log stream --predicate 'process == "io.tailscale.ipn.macsys.network-extension"' for open-conn-track: timeout opening (TCP <tailscale-ip>:* => 8.8.8.8:443|853 ...); no associated peer node for the next several minutes; DNS lookups stall meanwhile.
  4. Confirm the misroute independently: nc -z -w 6 -s <tailscale-ip> 8.8.8.8 443 hangs for 75 s while nc -z -w 6 8.8.8.8 443 succeeds instantly, and netstat -rn -f inet shows cloned ifscope host routes for 8.8.8.8 / 1.1.1.1 on the utun interface.

Are there any recent changes that introduced the issue?

Not known. Noticed as "internet takes minutes to come back after wake even though Wi-Fi is connected". Also observed with 1.102.2 (the previous extension version is still listed as "waiting to uninstall on reboot").

OS

macOS

OS version

macOS 26.6.2 (25G83), Apple Silicon

Tailscale version

1.102.3 (standalone io.tailscale.ipn.macsys, commit 9329c3677031109ff6d0b80abee0cddc8f35ff6f)

Other software

Karabiner-Elements DriverKit extension (HID only). No other network extensions, VPNs, or DNS filters.

Bug report

BUG-2f73609a3bff4eb30883f75b075aba18b37d218aff0776641e072c003c119dc2-20260908191637Z-f94b12602707cfdc

Activity

  1. added
    bug
    OS-macos
    on Sep 9, 2026
  2. added theissue type on Sep 9, 2026
  3. RitwikGupta commented on Sep 23, 2026

    @RitwikGupta

    Just +1ing this issue. I am facing this a lot, on almost every wakeup or Wi-Fi/Ethernet switch. The workaround shared by @croakerbcts works, but that is not ideal as it requires manual maintenance.

  4. skjdghsdjgsdj commented on Oct 10, 2026

    @skjdghsdjgsdj

    I'm also having this issue. It's hard to tell the pattern so maybe a race condition, but on occasion when I wake my Mac from sleep, I have no DNS resolution. Cycling Wi-Fi off and on makes it immediately reconnect. I've had this problem on multiple macOS versions, including 27.0.1 which at the moment is the latest one. I have Tailscale 1.102.4, the "standalone variant."

    Claude says:

    Same issue on macOS 27.0.1 (Apple Silicon). One difference from the original report: this tailnet has no global nameservers and "Override DNS servers" is off, only split DNS domains. 100.100.100.100 still becomes the Mac's only system resolver, and the forwarder passes all other lookups to the DHCP-assigned DNS server, 192.168.1.2. That server is on the Mac's LAN and is also inside 192.168.1.0/24, a subnet route this Mac accepts.

    After some wakes from sleep, all DNS on the Mac fails for about a minute while IP connectivity works. During a failure, on the same LAN as the DNS server:

    • /etc/resolv.conf lists only 100.100.100.100 and fd7a:115c:a1e0::53.
    • dig @192.168.1.2 and dig @1.1.1.1 succeed. dig @100.100.100.100 times out.
    • route -n get 192.168.1.2 returns en0, but there's also an interface-scoped cloned host route for it on the tunnel:
    192.168.1.2        link#25            UHWIi               utun4
    

    Network extension log for the same window:

    19:02:50 open-conn-track: timeout opening (TCP 100.71.181.122:57431 => 192.168.1.2:53) to node [xR/Kj]; online=yes, lastRecv=18s
    ...
    19:03:27 open-conn-track: timeout opening (TCP 100.71.181.122:57739 => 192.168.1.2:53) to node [xR/Kj]; online=yes, lastRecv=55s
    19:03:28 open-conn-track: timeout opening (TCP 100.71.181.122:57740 => 192.168.1.2:53) to node [xR/Kj]; online=yes, lastRecv=0s
    19:03:29 open-conn-track: timeout opening (TCP 100.71.181.122:57745 => 192.168.1.2:53) to node [xR/Kj]; online=yes, lastRecv=1s
    

    The forwarder's dials to 192.168.1.2 are sourced from the Tailscale IP and sent into the tunnel toward the subnet router instead of out en0. They fail until the tunnel to the subnet router comes back (lastRecv resets at 19:03:28), and the timeouts stop a second later.

  5. dcanones commented on Oct 14, 2026

    @dcanones

    Same issue here, with one extra data point: a DNS failure right after wake that has a real consequence on macOS. macOS treats the failed lookup as an auth failure and signs out every Google account in Internet Accounts (Mail/Contacts/Calendar), which then needs a manual re-login.

    Environment

    • macOS 27.0.1 (26A434), Apple Silicon MacBook Air
    • Tailscale 1.104.1 (standalone / macsys variant), CorpDNS: true ("Use Tailscale DNS" on)
    • No global nameservers and "Override DNS servers" off. Only split DNS for ts.net.. 100.100.100.100 is still the unscoped system resolver on utun1.
    • Bug report: BUG-3048ca3ff214efb2c004635cdc026cbe2d220b8562fb2f7e80050260133aaa36-20261014125550Z-105688112eefd2df

    Timeline of one wake (2026-10-13, local time, <tailnet> redacted)

    22:54:13.192  powerd   wake (Maintenance Sleep -> wake)
    22:54:13.698  tailscale LinkChange: major, rebinding
    22:54:13.698  tailscale dns: Set: {DefaultResolvers:[] Routes:{<tailnet>.ts.net.:[] ts.net.:[199.247.155.53 2620:111:8007::53]} ...}
    22:54:13.701  tailscale getDNSServers: could not get OS DNS servers: Fallthrough, no resolvers found
    22:54:13.701  tailscale wgengine: error setting DNS config after major link change: getDNSServers failed: Fallthrough, no resolvers found
    22:54:13.701  tailscale health(warnable=dns-read-os-config-failed): error
    22:54:13.716  configd   IPMonitor network changed: DNS* Proxy
    22:54:13.935  tailscale swiftNetMon: dns servers changed for en0: [] -> ["192.168.2.1"]
    22:54:13.935  tailscale networkExtensionSetter: DNS servers changed: [<previous network's ISP resolvers>] -> [192.168.2.1]
    22:54:13.935  tailscale dns: Resolvercfg: {Routes:{.:[192.168.2.1] ts.net.:[...]}}
    22:54:13.937  tailscale health(warnable=dns-read-os-config-failed): ok
    22:54:14.250  accountsd HTTP load failed for https://www.googleapis.com/oauth2/v4/token: NSURLErrorDomain -1003 "A server with the specified hostname could not be found" (domain_lookup_duration_ms=0)
    

    So the major link change after wake sees no OS resolvers for about 240 ms. A lookup 0.3 s after the forwarder was reconfigured still fails, and it fails instantly. I cannot tell from the logs whether quad-100 answered SERVFAIL during the gap and mDNSResponder cached it, or whether the query never reached the forwarder.

    Then the #21154 signature on later wakes the same night. From 23:10 onward, almost every dark wake shows DoH/DoT dials sourced from the node's Tailscale IP and timing out inside the tunnel:

    23:10:27-23:10:47  64x  open-conn-track: timeout opening (TCP 100.x.x.x:5016x => 1.1.1.1:443 / 1.1.1.1:853); no associated peer node
    00:17:39-00:17:55  71x  same
    02:28:02-02:28:28  77x  same
    05:31:02-05:31:28 100x  same
    

    (About 30 windows between 23:10 and 06:30, one per dark wake.)

    Workaround confirmation: with "Use Tailscale DNS" off, scutil --dns shows only the router as resolver #1. I'm testing whether the logouts stop and will report back.

  6. JeroenvdV commented on Oct 20, 2026

    @JeroenvdV

    I'm also experiencing this and adding the following for context:

    The forwarder caps concurrent queries at 256. After wake, its upstream dials (DoH/DoT/UDP) go into the tunnel and time out, holding each in-flight slot for up to the 75-second kernel connect timeout. The normal wake query burst pins the slots, the queue overflows (request queue full), mDNSResponder retransmits, and the loop sustains itself for minutes. The trigger is the wake but the real effect is caused by the burst of queries not succeeding:

    I think this is related to #21849. The forwarder relays the DDR question to Cloudflare/Google. macOS builds DoH/DoT services scoped to the tunnel interface and dials 1.1.1.1/8.8.8.8 on 443/853 with its Tailscale source IP. No peer owns those destinations, so every dial dies. In my case, I'm not connected to an exit node. My expectation is that solving #21849 would solve #21154 because the queries would no longer fail.

  7. samc-ts commented on Nov 24, 2026

    @samc-ts

    Customer reported this in go/tss/TSS-105604, and they experienced this in both 1.104.5 and 1.104.7 standalone MacOS 26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-macosbugdns

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions