ipn/ipnlocal: add arpa suffixes to MagicDNS for reverse lookups.

This used to not be necessary, because MagicDNS always did full proxying.
But with split DNS, we need to know which names to route to our resolver,
otherwise reverse lookups break.

This captures the entire CGNAT range, as well as our Tailscale ULA.

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/1749/head
David Anderson 3 years ago
parent 89c81c26c5
commit 6fd9e28bd0

@ -1806,7 +1806,19 @@ func magicDNSRootDomains(nm *netmap.NetworkMap) []dnsname.FQDN {
// TODO: propagate error
return nil
}
return []dnsname.FQDN{fqdn}
ret := []dnsname.FQDN{
fqdn,
dnsname.FQDN("0.e.1.a.c.5.1.1.a.7.d.f.ip6.arpa."),
}
for i := 64; i <= 127; i++ {
fqdn, err = dnsname.ToFQDN(fmt.Sprintf("%d.100.in-addr.arpa.", i))
if err != nil {
// TODO: propagate error
continue
}
ret = append(ret, fqdn)
}
return ret
}
return nil
}

Loading…
Cancel
Save