Closed AlexIT-FT closed 2 years ago
2022-08-31T05:54:49 acme.sh [Wed Aug 31 05:54:49 UTC 2022] *.fibertelecom.com:Verify error:DNS problem: SERVFAIL looking up TXT for _acme-challenge.fibertelecom.com - the domain's nameservers may be malfunctioning
As reported by acme.sh, a SERVFAIL DNS error has occured. This most likely hints at an issue with the nameservers of your domain.
Just upgraded to OPNsense v22.7.3_2 , but acme version is still v3.13 ... nothing touched in configuration or nameserver
But ... now it's working ! :O
These are the logs using "Let's Encrypt Test CA"
php AcmeClient: running automation (configd): Restart Nginx php AcmeClient: running automation (configd): Restart HaProxy php AcmeClient: running automations for certificate: .fibertelecom.com opnsense AcmeClient: imported ACME X.509 certificate: .fibertelecom.com opnsense AcmeClient: importing ACME CA: (STAGING) Artificial Apricot R3 opnsense AcmeClient: successfully issued/renewed certificate: .fibertelecom.com opnsense AcmeClient: running acme.sh command: /usr/local/sbin/acme.sh --issue --syslog 7 --debug 3 --server 'letsencrypt_test' --dns 'dns_nsupdate' --dnssleep '30' --home '/var/etc/acme-client/home' --certpath '/var/etc/acme-client/certs/630e16fd428678.73410954/cert.pem' --keypath '/var/etc/acme-client/keys/630e16fd428678.73410954/private.key' --capath '/var/etc/acme-client/certs/630e16fd428678.73410954/chain.pem' --fullchainpath '/var/etc/acme-client/certs/630e16fd428678.73410954/fullchain.pem' --domain '.fibertelecom.com' --days '1' --keylength '4096' --accountconf '/var/etc/acme-client/accounts/630e22238d0e13.59919420_stg/account.conf' opnsense AcmeClient: using challenge type: Dns Challange fibertelecom.com opnsense AcmeClient: account is registered: .fibertelecom.com TEST opnsense AcmeClient: using CA: letsencrypt_test opnsense AcmeClient: issue certificate: .fibertelecom.com opnsense AcmeClient: certificate must be issued/renewed: .fibertelecom.com php AcmeClient: running automation (configd): Restart Nginx php AcmeClient: running automation (configd): Restart HaProxy php AcmeClient: running automations for certificate: .fibertelecom.com opnsense AcmeClient: imported ACME X.509 certificate: .fibertelecom.com opnsense AcmeClient: importing ACME CA: (STAGING) Artificial Apricot R3 opnsense AcmeClient: successfully issued/renewed certificate: .fibertelecom.com opnsense AcmeClient: running acme.sh command: /usr/local/sbin/acme.sh --issue --syslog 7 --debug 3 --server 'letsencrypt_test' --dns 'dns_nsupdate' --dnssleep '30' --home '/var/etc/acme-client/home' --certpath '/var/etc/acme-client/certs/630e16fd428678.73410954/cert.pem' --keypath '/var/etc/acme-client/keys/630e16fd428678.73410954/private.key' --capath '/var/etc/acme-client/certs/630e16fd428678.73410954/chain.pem' --fullchainpath '/var/etc/acme-client/certs/630e16fd428678.73410954/fullchain.pem' --domain '.fibertelecom.com' --days '1' --keylength '4096' --accountconf '/var/etc/acme-client/accounts/630e22238d0e13.59919420_stg/account.conf' opnsense AcmeClient: using challenge type: Dns Challange fibertelecom.com opnsense AcmeClient: account is registered: .fibertelecom.com TEST opnsense AcmeClient: using CA: letsencrypt_test opnsense AcmeClient: issue certificate: .fibertelecom.com opnsense AcmeClient: certificate must be issued/renewed: .fibertelecom.com
acme.sh _on_issue_success acme.sh Installing full chain to: /var/etc/acme-client/certs/630e16fd428678.73410954/fullchain.pem acme.sh Installing key to: /var/etc/acme-client/keys/630e16fd428678.73410954/private.key acme.sh Installing CA to: /var/etc/acme-client/certs/630e16fd428678.73410954/chain.pem acme.sh Installing cert to: /var/etc/acme-client/certs/630e16fd428678.73410954/cert.pem acme.sh And the full chain certs is there: /var/etc/acme-client/home/.fibertelecom.com/fullchain.cer acme.sh The intermediate CA cert is in: /var/etc/acme-client/home/.fibertelecom.com/ca.cer acme.sh Your cert key is in: /var/etc/acme-client/home/.fibertelecom.com/.fibertelecom.com.key acme.sh Your cert is in: /var/etc/acme-client/home/.fibertelecom.com/.fibertelecom.com.cer acme.sh Cert success. acme.sh Le_LinkCert='https://acme-staging-v02.api.letsencrypt.org/acme/cert/fae2dc7c4334e1c3f069d46b029c726d5cfe' acme.sh _end_n='36' acme.sh Found cert chain acme.sh code='200' acme.sh _ret='0' acme.sh _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L --trace-ascii /tmp/tmp.W9CdftaD ' acme.sh _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/cert/fae2dc7c4334e1c3f069d46b029c726d5cfe' acme.sh POST acme.sh payload acme.sh url='https://acme-staging-v02.api.letsencrypt.org/acme/cert/fae2dc7c4334e1c3f069d46b029c726d5cfe' acme.sh Le_LinkCert='https://acme-staging-v02.api.letsencrypt.org/acme/cert/fae2dc7c4334e1c3f069d46b029c726d5cfe' acme.sh Downloading cert. acme.sh Le_LinkCert='https://acme-staging-v02.api.letsencrypt.org/acme/cert/fae2dc7c4334e1c3f069d46b029c726d5cfe' acme.sh Order status is valid. acme.sh code='200' acme.sh _ret='0' acme.sh _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L --trace-ascii /tmp/tmp.W9CdftaD ' acme.sh _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/finalize/66518223/3947136873' acme.sh POST acme.sh payload='{"csr": "MIIEkjCCAnoCA.......BfZxTntnLprDkCcka0JCKW67A"}' acme.sh url='https://acme-staging-v02.api.letsencrypt.org/acme/finalize/66518223/3947136873' acme.sh Le_OrderFinalize='https://acme-staging-v02.api.letsencrypt.org/acme/finalize/66518223/3947136873' acme.sh Lets finalize the order. acme.sh j='26' acme.sh i='2' acme.sh Verify finished, start to sign. acme.sh Removed: Success acme.sh removing _acme-challenge.fibertelecom.com. txt acme.sh Removing txt: HwaP0kkv51jUwHrz0t6ASaRcmod4bhIMEIIJ0B_lXWo for domain: _acme-challenge.fibertelecom.com acme.sh d_api='/usr/local/share/examples/acme.sh/dnsapi/dns_nsupdate.sh' acme.sh txt='HwaP0kkv51jUwHrz0t6ASaRcmod4bhIMEIIJ0B_lXWo' acme.sh _currentRoot='dns_nsupdate' acme.sh aliasDomain='_acme-challenge.fibertelecom.com' acme.sh txtdomain='_acme-challenge.fibertelecom.com' acme.sh d='fibertelecom.com' acme.sh Removing DNS records. acme.sh dns_entries='fibertelecom.com,_acme-challenge.fibertelecom.com,,dns_nsupdate,HwaP0kkv51jUwHrz0t6ASaRcmod4bhIMEIIJ0B_lXWo,/usr/local/share/examples/acme.sh/dnsapi/dns_nsupdate.sh acme.sh _clearupdns acme.sh No need to restore nginx, skip. acme.sh pid acme.sh Skip for removelevel: acme.sh pid acme.sh Success acme.sh code='200' acme.sh _ret='0' acme.sh _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L --trace-ascii /tmp/tmp.W9CdftaD ' acme.sh _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/3550832853/UL8Qug' acme.sh POST acme.sh payload acme.sh url='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/3550832853/UL8Qug' acme.sh checking acme.sh sleep 2 secs to verify again acme.sh Pending, The CA is processing your order, please just wait. (1/30) acme.sh trigger validation code: 200 acme.sh code='200' acme.sh _ret='0' acme.sh _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L --trace-ascii /tmp/tmp.W9CdftaD ' acme.sh _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/3550832853/UL8Qug' acme.sh POST acme.sh payload='{}' acme.sh url='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/3550832853/UL8Qug' acme.sh _currentRoot='dns_nsupdate' acme.sh uri='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/3550832853/UL8Qug' acme.sh keyauthorization='Sd0i6ZCZa_PppAz8_GBPOfH-stqX-uAkptWnkm1JzyM.Sgc2Szv5GT1AiCkTjGqRWbgXtQGunnjIqj81lAolIl4' acme.sh d='.fibertelecom.com' acme.sh Verifying: .fibertelecom.com acme.sh ok, let's start to verify acme.sh Sleep 30 seconds for the txt records to take effect acme.sh The txt record is added: Success. acme.sh adding _acme-challenge.fibertelecom.com. 60 in txt "HwaP0kkv51jUwHrz0t6ASaRcmod4bhIMEIIJ0B_lXWo" acme.sh Adding txt value: HwaP0kkv51jUwHrz0t6ASaRcmod4bhIMEIIJ0B_lXWo for domain: _acme-challenge.fibertelecom.com acme.sh Found domain api file: /usr/local/share/examples/acme.sh/dnsapi/dns_nsupdate.sh acme.sh d_api='/usr/local/share/examples/acme.sh/dnsapi/dns_nsupdate.sh' acme.sh txt='HwaP0kkv51jUwHrz0t6ASaRcmod4bhIMEIIJ0B_lXWo' acme.sh txtdomain='_acme-challenge.fibertelecom.com' acme.sh _d_alias acme.sh d='.fibertelecom.com' acme.sh vlist='.fibertelecom.com#Sd0i6ZCZa_PppAz8_GBPOfH-stqX-uAkptWnkm1JzyM.Sgc2Szv5GT1AiCkTjGqRWbgXtQGunnjIqj81lAolIl4#https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/3550832853/UL8Qug#dns-01#dns_nsupdate,' acme.sh d acme.sh dvlist='.fibertelecom.com#Sd0i6ZCZa_PppAz8_GBPOfH-stqX-uAkptWnkm1JzyM.Sgc2Szv5GT1AiCkTjGqRWbgXtQGunnjIqj81lAolIl4#https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/3550832853/UL8Qug#dns-01#dns_nsupdate' acme.sh keyauthorization='Sd0i6ZCZa_PppAz8_GBPOfH-stqX-uAkptWnkm1JzyM.Sgc2Szv5GT1AiCkTjGqRWbgXtQGunnjIqj81lAolIl4' acme.sh uri='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/3550832853/UL8Qug' acme.sh token='Sd0i6ZCZa_PppAz8_GBPOfH-stqX-uAkptWnkm1JzyM' acme.sh entry='"type":"dns-01","status":"pending","url":"https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/3550832853/UL8Qug","token":"Sd0i6ZCZa_PppAz8_GBPOfH-stqX-uAkptWnkm1JzyM"' acme.sh _currentRoot='dns_nsupdate' acme.sh _w='dns_nsupdate' acme.sh Getting webroot for domain='.fibertelecom.com' acme.sh d='.fibertelecom.com' acme.sh code='200' acme.sh _ret='0' acme.sh _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L --trace-ascii /tmp/tmp.W9CdftaD ' acme.sh _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/3550832853' acme.sh POST acme.sh payload acme.sh url='https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/3550832853' acme.sh Le_OrderFinalize='https://acme-staging-v02.api.letsencrypt.org/acme/finalize/66518223/3947136873' acme.sh Le_LinkOrder='https://acme-staging-v02.api.letsencrypt.org/acme/order/66518223/3947136873' acme.sh code='201' acme.sh _ret='0' acme.sh _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L --trace-ascii /tmp/tmp.W9CdftaD ' acme.sh _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/new-order' acme.sh POST acme.sh _ret='0' acme.sh _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L --trace-ascii /tmp/tmp.W9CdftaD -I ' acme.sh _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce' acme.sh HEAD acme.sh RSA key acme.sh payload='{"identifiers": [{"type":"dns","value":".fibertelecom.com"}]}' acme.sh url='https://acme-staging-v02.api.letsencrypt.org/acme/new-order' acme.sh d acme.sh Getting domain auth token for each domain acme.sh Single domain='.fibertelecom.com' acme.sh _createcsr acme.sh Read key length:4096 acme.sh _saved_account_key_hash is not changed, skip register account. acme.sh d acme.sh _currentRoot='dns_nsupdate' acme.sh Check for domain='.fibertelecom.com' acme.sh d='.fibertelecom.com' acme.sh Le_LocalAddress acme.sh _chk_alt_domains acme.sh _chk_main_domain='.fibertelecom.com' acme.sh _on_before_issue acme.sh Using CA: https://acme-staging-v02.api.letsencrypt.org/directory acme.sh ACME_NEW_NONCE='https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce' acme.sh ACME_AGREEMENT='https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017-w-v1.3-notice.pdf' acme.sh ACME_REVOKE_CERT='https://acme-staging-v02.api.letsencrypt.org/acme/revoke-cert' acme.sh ACME_NEW_ACCOUNT='https://acme-staging-v02.api.letsencrypt.org/acme/new-acct' acme.sh ACME_NEW_ORDER='https://acme-staging-v02.api.letsencrypt.org/acme/new-order' acme.sh ACME_NEW_AUTHZ acme.sh ACME_KEY_CHANGE='https://acme-staging-v02.api.letsencrypt.org/acme/key-change' acme.sh ret='0' acme.sh _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L --trace-ascii /tmp/tmp.9hlYu3Av ' acme.sh timeout= acme.sh url='https://acme-staging-v02.api.letsencrypt.org/directory' acme.sh GET acme.sh _init api for server: https://acme-staging-v02.api.letsencrypt.org/directory acme.sh Using ACME_DIRECTORY: https://acme-staging-v02.api.letsencrypt.org/directory acme.sh Le_NextRenewTime acme.sh DOMAIN_PATH='/var/etc/acme-client/home/.fibertelecom.com' acme.sh ACME_DIRECTORY='https://acme-staging-v02.api.letsencrypt.org/directory' acme.sh Using config home:/var/etc/acme-client/home acme.sh _alt_domains='no' acme.sh _main_domain='.fibertelecom.com' acme.sh Running cmd: issue acme.sh Using server: letsencrypt_test
And it seems to work also with "Let's Encrypt CA".
I had tried just before the upgrade and it had failed. After upgrade it's working.
I'm closing ... for me with OPNsense v22.7.3_2 is now working. Thanks.
Important notices
Describe the bug It's my first OPNsense so, never tested with previous version I have a BIND9 server, working with nsupdate to update records When I send a widlcard certificate request from acme-client plugin, the order request is sent to letsencrypt, the DNS-01 challange starts, then nsupdate asks for record TXT to be updated, in the server th bind9 execute and update the _acme-challenge record ...
till now it's ok
I see the request in BIND9 log, it's accepted and executed
from an external windows client I can verify the changes with nslookup -type=TXT _acme-challenge.fibertelecom.com ns1.fibetelecom.com nslookup -type=TXT _acme-challenge.fibertelecom.com ns2.fibetelecom.com nslookup -type=TXT _acme-challenge.fibertelecom.com ns3.fibetelecom.com nslookup -type=TXT _acme-challenge.fibertelecom.com and all of them show the new value correctly like this
but after the sleep period (60sec or so) in the log I can see the error domain validation failed (dns01) validation for certificate failed: *.fibertelecom.com
To Reproduce Steps to reproduce the behavior:
go to Services->ACMEclient->Certificate click on "Issue or renew Certificate" icon ⟳
wait for about 1 min
go to Services->ACMEclient->LogFiles see error in SystemLog and ACMElog
Expected behavior request new order to letsencrypt OK ask for dns challenge OK dnsupdate to create/update TXT record (request to my bind9) OK bind9 to create/update TXT record in the correct ZONE (reply from my bind9) OK wait a while for master/slave propagation OK dns check/lookup from letsencrypt FAIL certificate signed SKIPPED dnsupdate to delete TXT record (request to my bind9) OK bind9 to delete TXT record in the correct ZONE (reply from my bind9) OK
Screenshots settings
account
challenge type
certificate
Relevant log files
/var/log/named/bind.log FROM BIND9 SERVER
System Log FROM Services: ACME Client: Log Files (reverse order)
ACME log FROM Services: ACME Client: Log Files
Additional context The namsserver must be configured to accept dns dynamyc update RFC2136 (nsupdate)
In BIND9 server, just use
dnssec-keygen -a HMAC-SHA512 -b 512 -n HOST letsencrypt
and to allow nsupdate create a letsencrypt.key file like this
then allow update in named.conf
Environment on OPNsense appliance OPNsense 22.7.2-amd64 FreeBSD 13.1-RELEASE-p1 OpenSSL 1.1.1q 5 Jul 2022 plugin os-acme-client v3.13
Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz
on DNS server BIND9.11.5 (working well for years) Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz
(same issue as #3104, re-written using template ... please remove or merge)