From 9cdb33e2a470bf8feff88887148bc18a916207d5 Mon Sep 17 00:00:00 2001 From: Jun <56640554+SequoiaGod@users.noreply.github.com> Date: Wed, 5 Jun 2024 21:33:10 +0100 Subject: [PATCH] tsnet: add a new error when HTTPS enabled but MagicDNC Disabled (#12364) Fixes tailscale#12303 Signed-off-by: Jun --- tsnet/tsnet.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tsnet/tsnet.go b/tsnet/tsnet.go index b38c84fe4..19ba43ff1 100644 --- a/tsnet/tsnet.go +++ b/tsnet/tsnet.go @@ -959,6 +959,9 @@ func (s *Server) ListenTLS(network, addr string) (net.Listener, error) { if err != nil { return nil, err } + if !st.CurrentTailnet.MagicDNSEnabled { + return nil, errors.New("tsnet: you must enable MagicDNS in the DNS page of the admin panel to proceed. See https://tailscale.com/s/https") + } if len(st.CertDomains) == 0 { return nil, errors.New("tsnet: you must enable HTTPS in the admin panel to proceed. See https://tailscale.com/s/https") }