mirror of
https://github.com/acme-dns/acme-dns.git
synced 2026-04-27 12:55:48 +03:00
[GH-ISSUE #373] DNS server returns NXDOMAIN when it should not - preventing cache DNS from resolving the challenge #213
Labels
No labels
Documentation
Documentation
bug
enhancement
feature request
feature request
help wanted
pull-request
question
security
security
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/acme-dns#213
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lbauer13 on GitHub (Feb 19, 2025).
Original GitHub issue: https://github.com/acme-dns/acme-dns/issues/373
Usecase : traefik with DNS challenge, a local ACME (step-ca), acme-dns, and a local DNS resolver.
Problem : traefik initially checks for DNS propagation querying the SOA and CNAME records for the challenge (not the TXT). As acme-dns returns NXDOMAIN, the nonexistence is cached by the local resolver with the default "minimum" value set in acme-dns zone (86400). Further queries for the same challenge, even with the correct type TXT fail because of this negative cache, preventing the ACME from issuing the certificate.
How to reproduce :
acme-dns config (DNS section) :
Configure traefik with an ACME certificate resolver, and a DNS challenge (
ACME_DNS_API_BASEenvironment var to the acme-dns server)Traefik will request a certificate for
myapp.zoneand*.myapp.zone, and register a subdomain via acme-dns API ; sayd8659307-a365-4973-855e-13fb1508e4ab.Manually create the CNAME with the registered subdomain as its rdata :
Restart traefik to tell the ACME to check the challenge.
Traefik will first check DNS propagation by following the CNAME and querying types SOA and CNAME :
Because of the NXDOMAIN response code, the resolver will then cache the whole domain as nonexistent with a TTL value of 86400.
Any further request to the resolver, even type=TXT, will fail with the same NXDOMAIN.
Expected behaviour :
As per RFC 2308 section 5, these answers should be NODATA, that is NOERROR with an empty response (except for the existing TXT), as the name exists with another type. This would prevent a resolver from caching the domain as nonexistent :
Should the query target a nonexisting domain, acme-dns would still return a NXDOMAIN :
@lbauer13 commented on GitHub (Feb 19, 2025):
I made a PR here :
https://github.com/joohoi/acme-dns/pull/374
I will try to add tests later. Meanwhile, please feel free to comment, as I am new to golang.
@lbauer13 commented on GitHub (Mar 7, 2025):
Duplicates https://github.com/joohoi/acme-dns/issues/257