I have MagicDNS enabled. This works in my home network:
ping myhost
When I do the same using the same laptop from a different location, MagicDNS doesn’t seem to work and it uses Comcast name server:
myhost.x.y.comcast.net
Using the full domain works fine:
ping myhost.tailxxx.ts.net
tailscale is up and I forced reauth just in case.
Why isn’t MagicDNS working? I’m using Ubuntu 23.04.
I wonder is this is related to this Ubuntu issue:
opened 03:40PM - 14 May 22 UTC
OS-linux
L2 Few
P2 Aggravating
T5 Usability
dns
bug
### What is the issue?
I thought I'd reported this before but I couldn't find t… he bug. I just switched from one WiFi AP to another via NetworkManager on Ubuntu 20.04 and while my internet works, tailscale names do not:
```
$ tailscale status
100.65.163.69 caliburn frioux@ linux -
100.115.76.110 clarent frioux@ linux offline
100.80.98.105 dell frioux@ linux -
100.79.102.142 frewlinks frioux@ linux -
100.108.249.29 iphone frioux@ iOS offline
100.111.50.116 pi400 frioux@ linux idle, tx 201484 rx 4246004
100.120.207.30 pizero frioux@ linux -
100.112.38.65 raspberrypi frioux@ linux idle; offers exit node
100.76.90.44 retropie frioux@ linux -
100.80.114.110 steamos frioux@ linux offline
$ nslookup pi400
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find pi400: SERVFAIL
$ ping 100.111.50.116
PING 100.111.50.116 (100.111.50.116) 56(84) bytes of data.
64 bytes from 100.111.50.116: icmp_seq=1 ttl=64 time=8.07 ms
^C
--- 100.111.50.116 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 8.072/8.072/8.072/0.000 ms
$ nslookup pi400
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find pi400: SERVFAIL
$ systemctl status tailscaled.service
● tailscaled.service - Tailscale node agent
Loaded: loaded (/lib/systemd/system/tailscaled.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-05-13 19:11:40 PDT; 13h ago
Docs: https://tailscale.com/kb/
Main PID: 925511 (tailscaled)
Status: "Connected; frioux@github; 100.65.163.69 fd7a:115c:a1e0:ab12:4843:cd96:6241:a345"
Tasks: 12 (limit: 18787)
Memory: 19.3M
CGroup: /system.slice/tailscaled.service
└─925511 /usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port 41641
May 14 08:33:56 caliburn tailscaled[925511]: Accept: TCP{100.65.163.69:45418 > 100.111.50.116:8081} 60 ok out
May 14 08:33:56 caliburn tailscaled[925511]: Accept: TCP{100.111.50.116:8081 > 100.65.163.69:45418} 60 tcp non-syn
May 14 08:33:56 caliburn tailscaled[925511]: Accept: TCP{100.65.163.69:45418 > 100.111.50.116:8081} 52 ok out
May 14 08:33:56 caliburn tailscaled[925511]: magicsock: disco: node [sE2F2] d:3074a2571f5393d8 now using 192.168.50.150:41641
May 14 08:34:07 caliburn tailscaled[925511]: open-conn-track: timeout opening (TCP 100.65.163.69:48218 => 35.232.111.17:80); no associated peer node
May 14 08:34:08 caliburn tailscaled[925511]: Accept: TCP{100.65.163.69:45418 > 100.111.50.116:8081} 52 ok out
May 14 08:34:10 caliburn tailscaled[925511]: open-conn-track: timeout opening (TCP 100.65.163.69:48218 => 35.232.111.17:80); no associated peer node
May 14 08:34:18 caliburn tailscaled[925511]: Accept: TCP{100.65.163.69:45418 > 100.111.50.116:8081} 52 ok out
May 14 08:34:22 caliburn tailscaled[925511]: open-conn-track: timeout opening (TCP 100.65.163.69:48218 => 35.232.111.17:80); no associated peer node
May 14 08:34:29 caliburn tailscaled[925511]: Accept: TCP{100.65.163.69:45418 > 100.111.50.116:8081} 52 ok out
$ nslookup pi400
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find pi400: SERVFAIL
$ tailscale bugreport
BUG-5286a105daf3d974b6241f786c0fd2ca69341f9da4966d5454cbafc2ff8280c8-20220514153637Z-bb80a22858651860
```
### Steps to reproduce
I am not sure exactly how I ended up here. Even restarting the tailscaled service does not fix it.
### Are there any recent changes that introduced the issue?
_No response_
### OS
Linux
### OS version
Ubuntu 20.04
### Tailscale version
1.24.2
### Bug report
BUG-5286a105daf3d974b6241f786c0fd2ca69341f9da4966d5454cbafc2ff8280c8-20220514153637Z-bb80a22858651860
This is definitely not happening, from the docs:
When MagicDNS is enabled, it is always the first domain in the Search Domains list. This is not configurable by a user.
I have the following in /run/systemd/resolve/stub-resolv.conf:
nameserver 127.0.0.53
options edns0 trust-ad
search hsd1.ma.comcast.net tailfd524.ts.net
In /run/systemd/resolve/resolv.conf:
nameserver 75.75.75.75
nameserver 75.75.76.76
nameserver 2001:558:feed::1
Too many DNS servers configured, the following entries may be ignored.
nameserver 2001:558:feed::2
search hsd1.ma.comcast.net tailfd524.ts.net
and the followig symbolic link:
/etc/resolv.conf → …/run/systemd/resolve/stub-resolv.conf
Shouldn’t stub-resolve have the ts domain first when MagicDNS is enabled?
Finally, here is the service status output:
% resolvectl status
Global
Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Link 2 (enp2s0f0)
Current Scopes: none
Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Link 3 (wlp3s0)
Current Scopes: DNS
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 75.75.75.75
DNS Servers: 75.75.75.75 75.75.76.76 2001:558:feed::1 2001:558:feed::2
DNS Domain: hsd1.ma.comcast.net
Link 4 (tailscale0)
Current Scopes: DNS
Protocols: -DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 100.100.100.100
DNS Servers: 100.100.100.100
DNS Domain: tailfd524.ts.net ~0.e.1.a.c.5.1.1.a.7.d.f.ip6.arpa
~100.100.in-addr.arpa ~101.100.in-addr.arpa
~102.100.in-addr.arpa ~103.100.in-addr.arpa
~104.100.in-addr.arpa ~105.100.in-addr.arpa
~106.100.in-addr.arpa ~107.100.in-addr.arpa
… [more lines like this]