Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DoT (DNS over TLS) for Recursive Nameservers #4153

Closed
zamnuts opened this issue Jun 28, 2021 · 16 comments
Closed

Support DoT (DNS over TLS) for Recursive Nameservers #4153

zamnuts opened this issue Jun 28, 2021 · 16 comments
Labels
area/acme/dns01 Indicates a PR modifies ACME DNS01 provider code kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@zamnuts
Copy link

zamnuts commented Jun 28, 2021

Is your feature request related to a problem? Please describe.
When using split-horizon DNS or when a recursive resolver is not available, external recursive nameservers are recommended for use, see #2428 and #2143. Only UDP and TCP nameservers are supported, while neither DoH nor DoT are supported.

Describe the solution you'd like
Allow support for DNS over TLS. DoT is supported via miekg/dns#300. Specify using:

--dns01-recursive-nameservers=tls://9.9.9.9:853

# or possibly
--dns01-recursive-nameservers=tcp-tls://9.9.9.9:853

DNS over HTTPS is preferred, but DoH support was removed due to miekg/dns#800. Would specify using:

--dns01-recursive-nameservers=https://dns10.quad9.net/dns-query

Describe alternatives you've considered

  • Be OK with plaintext DNS lookups over the Intranet and Internet (trying to avoid this!)
  • Support a recursive resolver on-premise (not supported by forwarders, e.g. AdGuard)
  • Don't use split-horizon (this is used to avoid network hairpinning via DNS)

Additional context
TCP and UDP are only supported per &dns.Client{Net: "udp", Timeout: DNSTimeout} and &dns.Client{Net: "tcp", Timeout: DNSTimeout}: https://github.com/jetstack/cert-manager/blob/59c2a2d9f410e49cd9c43890e22fcc922655144a/pkg/issuer/acme/dns/util/wait.go#L160-L190

I brute-forced many options thinking I missed something in the code, all failed:

--dns01-recursive-nameservers-only --dns01-recursive-nameservers=https://dns10.quad9.net/dns-query
E0628 18:43:46.294949       1 controller.go:158] cert-manager/controller/challenges "msg"="re-queuing item  due to error processing" "error"="dial udp: address udp///dns10.quad9.net/dns-query: unknown port" "key"="foo/secret-rv76m-4132158546-3531276794" 
--dns01-recursive-nameservers-only --dns01-recursive-nameservers=https://dns10.quad9.net:443/dns-query
E0628 19:00:54.837306       1 main.go:38] cert-manager "msg"="error executing command" "error"="error validating options: invalid DNS server (address https://dns10.quad9.net:443/dns-query: too many colons in address): https://dns10.quad9.net:443/dns-query"  
--dns01-recursive-nameservers-only --dns01-recursive-nameservers=dns10.quad9.net/dns-query
E0628 18:50:52.175200       1 main.go:38] cert-manager "msg"="error executing command" "error"="error validating options: invalid DNS server (address dns10.quad9.net/dns-query: missing port in address): dns10.quad9.net/dns-query"  
--dns01-recursive-nameservers-only --dns01-recursive-nameservers=9.9.9.9:853
E0628 18:57:27.651395       1 controller.go:158] cert-manager/controller/challenges "msg"="re-queuing item  due to error processing" "error"="read udp 10.42.1.134:39324->9.9.9.9:853: read: no route to host" "key"="foo/secret-rv76m-4132158546-3531276794" 
--dns01-recursive-nameservers-only --dns01-recursive-nameservers=tls://9.9.9.9:853
E0628 18:59:07.420920       1 main.go:38] cert-manager "msg"="error executing command" "error"="error validating options: invalid DNS server (address tls://9.9.9.9:853: too many colons in address): tls://9.9.9.9:853"  
--dns01-recursive-nameservers-only --dns01-recursive-nameservers=tcp-tls://9.9.9.9:853
E0628 18:59:58.567351       1 main.go:38] cert-manager "msg"="error executing command" "error"="error validating options: invalid DNS server (address tcp-tls://9.9.9.9:853: too many colons in address): tcp-tls://9.9.9.9:853"  

Environment details (remove if not applicable):

  • Kubernetes version: v1.19.9
  • Cloud-provider/provisioner: nocloud (self-hosted), letsencrypt.org, cloudflare
  • cert-manager version: v1.0.4
  • Install method: helm
helm upgrade --install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --version v1.0.4 \
  --set installCRDs=true \
  --set 'extraArgs={--dns01-recursive-nameservers-only,--dns01-recursive-nameservers=9.9.9.9:53}'

/kind feature

@jetstack-bot jetstack-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 28, 2021
@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 30, 2021
@zamnuts
Copy link
Author

zamnuts commented Oct 12, 2021

/remove-lifecycle stale

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 12, 2021
@irbekrm irbekrm added area/acme/dns01 Indicates a PR modifies ACME DNS01 provider code kind/feature Categorizes issue or PR as related to a new feature. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Oct 25, 2021
@carpenike
Copy link

would love to see this as well. Ideally would like to redirect all :53 traffic to my router, but need external DNS for cert-manager.

@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 3, 2022
@zamnuts
Copy link
Author

zamnuts commented Apr 10, 2022

/remove-lifecycle stale

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 10, 2022
@SgtCoDFish
Copy link
Member

Something sort-of similar (DoH) is being worked on in this PR: #5003

If that landed, would it solve your issues? (I note you say you'd actually prefer DoH to DoT)

@SgtCoDFish SgtCoDFish added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Apr 28, 2022
@zamnuts
Copy link
Author

zamnuts commented Jul 14, 2022

I think that would satisfy this request.
DoH or DoT, either would suffice.

@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 12, 2022
@zamnuts
Copy link
Author

zamnuts commented Oct 12, 2022

waiting on #5003

/remove-lifecycle stale

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 12, 2022
@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 10, 2023
@zamnuts
Copy link
Author

zamnuts commented Jan 14, 2023

still waiting on #5003

/remove-lifecycle stale

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 14, 2023
@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 14, 2023
@zamnuts
Copy link
Author

zamnuts commented Apr 16, 2023

#5003 is still an open thing

/remove-lifecycle stale

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 16, 2023
@maelvls
Copy link
Member

maelvls commented Jun 13, 2023

Note to anyone following this thread: @FlorianLiebhart and I are actively working on #5003. I feel I have a good case to show the other maintainers to convince them that DNS-over-HTTPS with the JSON protocol makes sense to be implemented right into cert-manager.

@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 11, 2023
@zamnuts
Copy link
Author

zamnuts commented Sep 21, 2023

can confirm DoH is now supported for --dns01-recursive-nameservers. resolved via #5003 and released as part of v1.13.0

@zamnuts zamnuts closed this as completed Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/acme/dns01 Indicates a PR modifies ACME DNS01 provider code kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

6 participants