I'm trying to setup an issue and renew for a domain ( wildcard ) ( let's say example.com ) by delegating the acmedns to another domain ( let's say example.net ) wich already has his acme.sh script for his own certificates thus I have to use a subdomain to achieve this ( to not broke the working one ).
I have created a CNAME in example.com:
_acme-challenge.example CNAME authfr.example.net
In example.net I have created an A record:
authfr.example.net A xx.xx.xx.xx
and an NS record:
authfr.example.net NS authfr.example.net
Then, on the server xx.xx.xx.xx I have setup the acmedns with the same two records:
nsname = "authfr.example.net" nsadmin = "pigi.example.com" records = [ "authfr.example.net. A xx.xx.xx.xx", "authfr.example.net. NS authfr.example.net.", ]
Then I launch:
acme.sh --issue --server 'letsencrypt_test' -d '*.example.com' --domain-alias authfr.example.net --dns dns_acmedns -k 2048 --debug 2
which starts doing his things and it ask me to add:
# Create _acme-challenge.authfr.example.net CNAME c76432a1-02b2-4ee1-ad61-08f841bf1d9a.auth.acme-dns.io DNS entry #
which I do in example.net DNS, but it would not work, obviously as the authoritative server for authfr.example.net is on xx.xx.xx.xx server as instructed before, on acmedns server.
In the acmedns logs I see:
DEBU[4687] Answering question for domain domain=_acme-challenge.authfr.example.net. qtype=CNAME rcode=NOERROR
DEBU[4687] Answering question for domain domain=_acme-challenge.authfr.example.net. qtype=CNAME rcode=NOERROR
DEBU[4701] Answering question for domain domain=_ACme-chALLeNGE.aUthfr.EXample.neT. qtype=CNAME rcode=NOERROR
DEBU[4701] Answering question for domain domain=_acme-challenge.authfr.example.net. qtype=CNAME rcode=NOERROR
which is expected as I haven't add those records in acmedns ( I can't find a way ).
After a while I found a way to add those records to acmedns, by stopping it and adding in config.cfg, which now results in a valid response when querying, but still the acme.sh cicle without issuing the certs with those two messages:
Not valid yet, let's wait for 10 seconds then check the next one.
and
Purging Cloudflare TXT record for domain _acme-challenge.example.com
...
...
Purging Cloudflare TXT record for domain authfr.example.net
If, moreover, I add the --dnssleep 300 to avoid the loop on dns checking, the process ends but with an error, stating it cannot find th TXT record at example.com:
error='"error":{"type":"urn:ietf:params:acme:error:unauthorized","detail":"No TXT record found at _acme-challenge.example.com","status": 403'
errordetail='No TXT record found at _acme-challenge.example.com'
*.example.com: Invalid status. Verification error details: No TXT record found at _acme-challenge.example.com
Skipping for removelevel:
pid
No need to restore nginx config, skipping.
_clearupdns
dns_entries='example.com,_acme-challenge.example.com,authfr.example.net,dns_acmedns,cr4FXO_NNGSdAP30F3pAfct4v53gAJk3I6_x_K2FXUs,/root/.acme.sh/dnsapi/dns_acmedns.sh '
Removing DNS records.
d='example.com'
txtdomain='_acme-challenge.example.com'
aliasDomain='authfr.example.net'
_currentRoot='dns_acmedns'
txt='cr4FXO_NNGSdAP30F3pAfct4v53gAJk3I6_x_K2FXUs'
d_api='/root/.acme.sh/dnsapi/dns_acmedns.sh'
Removing txt: cr4FXO_NNGSdAP30F3pAfct4v53gAJk3I6_x_K2FXUs for domain: authfr.example.net
Using acme-dns
fulldomain authfr.example.net
txtvalue cr4FXO_NNGSdAP30F3pAfct4v53gAJk3I6_x_K2FXUs
Successfully removed
Am I doing somethin wrong of maybe I hit a bug ?
Thanks !
Pigi_102