-
Notifications
You must be signed in to change notification settings - Fork 642
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
security/acme-client: BIND API not working? Can't get txt entry #2535
Comments
If I try to reset acme client i get the following message: Is something wrong with my account?!? |
Also tried reinstalling my complete OPNsense. Am I really the only one with this problem? |
I dont use this feature and also didnt add it. To me it seems something break with acme 3.0. @fraenki any idea? |
+1 same problem here, 'invalid domain' error. |
Please check Is there a BIND log available? This could also tell us why the TXT entry cannot be created. |
Fragment of acme log when trying to get certificate:
I also made a ticket before on offical client: Backend log has only this entry on same time:
PHP has also error on same time: |
As i looked error seems to be from file https://github.com/acmesh-official/acme.sh/blob/master/dnsapi/dns_opnsense.sh , on line 153 we have regex to find root for domain. Maybe something changed on bind api, and returns different output? |
My Response for https://firewall/api/bind/domain/get:
I tried to solve the egrep regex... but I'm not nearly as good as I wish to be to unterstand was it's doing |
So to summarize the reports, this looks like an upstream issue in acme.sh that should be fixed there: |
This issue has been automatically timed-out (after 180 days of inactivity). For more information about the policies for this repository, If someone wants to step up and work on this issue, |
Important notices
[-] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
Yes
[-] I have searched the existing issues and I'm convinced that mine is new.
Yes
[-] The title contains the plugin to which this issue belongs
Yes
Describe the bug
I want to do the ACME Challenge with my local BIND Server running on OpnSense.
BIND is running and answering to external. ALIAS Settings are made on domain names.
I've already certified some requests with this method. But now it doesn't work anymore.
API with the user and curl is working.
Domain to verify; domain.de
Bind Server hears to: home.domain.de
If I read the log right the User can't access the BIND API.
Can anybody verify please if this is a real problem or if I'm just to stupid?
To Reproduce
Create LE Certificate with selfhosted BIND DNS Challenge.
Expected behavior
DNS Entry going to be written and everything else is working.
Screenshots
Relevant log files
Here is my acme.sh.log:
[Mon Sep 13 13:11:52 CEST 2021] ACME_DIRECTORY='https://acme-staging-v02.api.letsencrypt.org/directory'
[Mon Sep 13 13:11:52 CEST 2021] DOMAIN_PATH='/var/etc/acme-client/home/domain.de'
[Mon Sep 13 13:11:52 CEST 2021] Renew: 'domain.de'
[Mon Sep 13 13:11:52 CEST 2021] Le_API='https://acme-staging-v02.api.letsencrypt.org/directory'
[Mon Sep 13 13:11:52 CEST 2021] Using config home:/var/etc/acme-client/home
[Mon Sep 13 13:11:52 CEST 2021] ACME_DIRECTORY='https://acme-staging-v02.api.letsencrypt.org/directory'
[Mon Sep 13 13:11:52 CEST 2021] _init api for server: https://acme-staging-v02.api.letsencrypt.org/directory
[Mon Sep 13 13:11:52 CEST 2021] Retrying GET
[Mon Sep 13 13:11:52 CEST 2021] GET
[Mon Sep 13 13:11:52 CEST 2021] url='https://acme-staging-v02.api.letsencrypt.org/directory'
[Mon Sep 13 13:11:52 CEST 2021] timeout=
[Mon Sep 13 13:11:52 CEST 2021] displayError='1'
[Mon Sep 13 13:11:52 CEST 2021] _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L '
[Mon Sep 13 13:11:53 CEST 2021] ret='0'
[Mon Sep 13 13:11:53 CEST 2021] _hcode='0'
[Mon Sep 13 13:11:53 CEST 2021] ACME_KEY_CHANGE='https://acme-staging-v02.api.letsencrypt.org/acme/key-change'
[Mon Sep 13 13:11:53 CEST 2021] ACME_NEW_AUTHZ
[Mon Sep 13 13:11:53 CEST 2021] ACME_NEW_ORDER='https://acme-staging-v02.api.letsencrypt.org/acme/new-order'
[Mon Sep 13 13:11:53 CEST 2021] ACME_NEW_ACCOUNT='https://acme-staging-v02.api.letsencrypt.org/acme/new-acct'
[Mon Sep 13 13:11:53 CEST 2021] ACME_REVOKE_CERT='https://acme-staging-v02.api.letsencrypt.org/acme/revoke-cert'
[Mon Sep 13 13:11:53 CEST 2021] ACME_AGREEMENT='https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf'
[Mon Sep 13 13:11:53 CEST 2021] ACME_NEW_NONCE='https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce'
[Mon Sep 13 13:11:53 CEST 2021] _main_domain='domain.de'
[Mon Sep 13 13:11:53 CEST 2021] _alt_domains='domain.de'
[Mon Sep 13 13:11:53 CEST 2021] Using ACME_DIRECTORY: https://acme-staging-v02.api.letsencrypt.org/directory
[Mon Sep 13 13:11:53 CEST 2021] _init api for server: https://acme-staging-v02.api.letsencrypt.org/directory
[Mon Sep 13 13:11:53 CEST 2021] Le_NextRenewTime
[Mon Sep 13 13:11:53 CEST 2021] Using CA: https://acme-staging-v02.api.letsencrypt.org/directory
[Mon Sep 13 13:11:53 CEST 2021] _on_before_issue
[Mon Sep 13 13:11:53 CEST 2021] _chk_main_domain='domain.de'
[Mon Sep 13 13:11:53 CEST 2021] _chk_alt_domains='domain.de'
[Mon Sep 13 13:11:53 CEST 2021] Le_LocalAddress
[Mon Sep 13 13:11:53 CEST 2021] d='domain.de'
[Mon Sep 13 13:11:53 CEST 2021] Check for domain='domain.de'
[Mon Sep 13 13:11:53 CEST 2021] _currentRoot='dns_opnsense'
[Mon Sep 13 13:11:53 CEST 2021] d='domain.de'
[Mon Sep 13 13:11:53 CEST 2021] Check for domain='domain.de'
[Mon Sep 13 13:11:53 CEST 2021] _currentRoot='dns_opnsense'
[Mon Sep 13 13:11:53 CEST 2021] d
[Mon Sep 13 13:11:53 CEST 2021] _saved_account_key_hash is not changed, skip register account.
[Mon Sep 13 13:11:53 CEST 2021] Read key length:4096
[Mon Sep 13 13:11:53 CEST 2021] _createcsr
[Mon Sep 13 13:11:53 CEST 2021] Multi domain='DNS:domain.de,DNS:domain.de'
[Mon Sep 13 13:11:53 CEST 2021] Getting domain auth token for each domain
[Mon Sep 13 13:11:53 CEST 2021] d='domain.de'
[Mon Sep 13 13:11:53 CEST 2021] d
[Mon Sep 13 13:11:53 CEST 2021] url='https://acme-staging-v02.api.letsencrypt.org/acme/new-order'
[Mon Sep 13 13:11:53 CEST 2021] payload='{"identifiers": [{"type":"dns","value":"domain.de"},{"type":"dns","value":"domain.de"}]}'
[Mon Sep 13 13:11:53 CEST 2021] RSA key
[Mon Sep 13 13:11:55 CEST 2021] Retrying post
[Mon Sep 13 13:11:55 CEST 2021] HEAD
[Mon Sep 13 13:11:55 CEST 2021] _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce'
[Mon Sep 13 13:11:55 CEST 2021] _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L -I '
[Mon Sep 13 13:11:56 CEST 2021] _ret='0'
[Mon Sep 13 13:11:56 CEST 2021] _hcode='0'
[Mon Sep 13 13:11:56 CEST 2021] Retrying post
[Mon Sep 13 13:11:56 CEST 2021] POST
[Mon Sep 13 13:11:56 CEST 2021] _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/new-order'
[Mon Sep 13 13:11:56 CEST 2021] _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L '
[Mon Sep 13 13:11:56 CEST 2021] _ret='0'
[Mon Sep 13 13:11:56 CEST 2021] _hcode='0'
[Mon Sep 13 13:11:56 CEST 2021] code='201'
[Mon Sep 13 13:11:56 CEST 2021] Le_LinkOrder='https://acme-staging-v02.api.letsencrypt.org/acme/order/8541739/523858448'
[Mon Sep 13 13:11:56 CEST 2021] Le_OrderFinalize='https://acme-staging-v02.api.letsencrypt.org/acme/finalize/8541739/523858448'
[Mon Sep 13 13:11:56 CEST 2021] url='https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/483058388'
[Mon Sep 13 13:11:56 CEST 2021] payload
[Mon Sep 13 13:11:57 CEST 2021] Retrying post
[Mon Sep 13 13:11:57 CEST 2021] POST
[Mon Sep 13 13:11:57 CEST 2021] _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/483058388'
[Mon Sep 13 13:11:57 CEST 2021] _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L '
[Mon Sep 13 13:11:57 CEST 2021] _ret='0'
[Mon Sep 13 13:11:57 CEST 2021] _hcode='0'
[Mon Sep 13 13:11:57 CEST 2021] code='200'
[Mon Sep 13 13:11:57 CEST 2021] d='domain.de'
[Mon Sep 13 13:11:57 CEST 2021] Getting webroot for domain='domain.de'
[Mon Sep 13 13:11:57 CEST 2021] _w='dns_opnsense'
[Mon Sep 13 13:11:57 CEST 2021] _currentRoot='dns_opnsense'
[Mon Sep 13 13:11:57 CEST 2021] entry='"type":"dns-01","status":"pending","url":"https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A","token":"8jxbpWA6h5xBmveMs7Uh6r_vUlHbcy2MVo07LzI8ioE"'
[Mon Sep 13 13:11:57 CEST 2021] token='8jxbpWA6h5xBmveMs7Uh6r_vUlHbcy2MVo07LzI8ioE'
[Mon Sep 13 13:11:57 CEST 2021] uri='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A'
[Mon Sep 13 13:11:57 CEST 2021] keyauthorization='8jxbpWA6h5xBmveMs7Uh6r_vUlHbcy2MVo07LzI8ioE.AH8IvW3zEUkdY5c0LEC6FsDQGyUfpf6twWlG2xaoDMg'
[Mon Sep 13 13:11:57 CEST 2021] dvlist='domain.de#8jxbpWA6h5xBmveMs7Uh6r_vUlHbcy2MVo07LzI8ioE.AH8IvW3zEUkdY5c0LEC6FsDQGyUfpf6twWlG2xaoDMg#https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A#dns-01#dns_opnsense'
[Mon Sep 13 13:11:57 CEST 2021] d='domain.de'
[Mon Sep 13 13:11:57 CEST 2021] Getting webroot for domain='domain.de'
[Mon Sep 13 13:11:57 CEST 2021] _w='dns_opnsense'
[Mon Sep 13 13:11:57 CEST 2021] _currentRoot='dns_opnsense'
[Mon Sep 13 13:11:58 CEST 2021] entry='"type":"dns-01","status":"pending","url":"https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A","token":"8jxbpWA6h5xBmveMs7Uh6r_vUlHbcy2MVo07LzI8ioE"'
[Mon Sep 13 13:11:58 CEST 2021] token='8jxbpWA6h5xBmveMs7Uh6r_vUlHbcy2MVo07LzI8ioE'
[Mon Sep 13 13:11:58 CEST 2021] uri='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A'
[Mon Sep 13 13:11:58 CEST 2021] keyauthorization='8jxbpWA6h5xBmveMs7Uh6r_vUlHbcy2MVo07LzI8ioE.AH8IvW3zEUkdY5c0LEC6FsDQGyUfpf6twWlG2xaoDMg'
[Mon Sep 13 13:11:58 CEST 2021] dvlist='domain.de#8jxbpWA6h5xBmveMs7Uh6r_vUlHbcy2MVo07LzI8ioE.AH8IvW3zEUkdY5c0LEC6FsDQGyUfpf6twWlG2xaoDMg#https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A#dns-01#dns_opnsense'
[Mon Sep 13 13:11:58 CEST 2021] d
[Mon Sep 13 13:11:58 CEST 2021] vlist='domain.de#8jxbpWA6h5xBmveMs7Uh6r_vUlHbcy2MVo07LzI8ioE.AH8IvW3zEUkdY5c0LEC6FsDQGyUfpf6twWlG2xaoDMg#https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A#dns-01#dns_opnsense,domain.de#8jxbpWA6h5xBmveMs7Uh6r_vUlHbcy2MVo07LzI8ioE.AH8IvW3zEUkdY5c0LEC6FsDQGyUfpf6twWlG2xaoDMg#https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A#dns-01#dns_opnsense,'
[Mon Sep 13 13:11:58 CEST 2021] d='domain.de'
[Mon Sep 13 13:11:58 CEST 2021] _d_alias='=home.domain.de'
[Mon Sep 13 13:11:58 CEST 2021] txtdomain='home.domain.de'
[Mon Sep 13 13:11:58 CEST 2021] txt='DL2BLudZh4LUAuQdGnQeG5t0L9PQN1LfyfqtxhshpQs'
[Mon Sep 13 13:11:58 CEST 2021] d_api='/usr/local/share/examples/acme.sh/dnsapi/dns_opnsense.sh'
[Mon Sep 13 13:11:58 CEST 2021] Found domain api file: /usr/local/share/examples/acme.sh/dnsapi/dns_opnsense.sh
[Mon Sep 13 13:11:58 CEST 2021] Adding txt value: DL2BLudZh4LUAuQdGnQeG5t0L9PQN1LfyfqtxhshpQs for domain: home.domain.de
[Mon Sep 13 13:11:58 CEST 2021] Retrying GET
[Mon Sep 13 13:11:58 CEST 2021] GET
[Mon Sep 13 13:11:58 CEST 2021] url='https://rV5jPL3dCT3E83%2fQeR%2bbMjSDLcEPkDoEAIKX6r5MLwiI5TFvLFoGUM2%2f5D4Uwmlf0MbKc6Vfh2Z2sUS9:aosAcQRuEsu0R6Utnk1cklzQYrgmqIPTpKihCtZaiqBvo8GqCeOZHIxgmslXCgzEAA6sgXvo%2b19QvaSN@127.0.0.1:443/api/bind/general/get'
[Mon Sep 13 13:11:58 CEST 2021] timeout=
[Mon Sep 13 13:11:58 CEST 2021] displayError='1'
[Mon Sep 13 13:11:58 CEST 2021] _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L --insecure '
[Mon Sep 13 13:11:58 CEST 2021] ret='0'
[Mon Sep 13 13:11:58 CEST 2021] _hcode='0'
[Mon Sep 13 13:11:58 CEST 2021] Adding record home.domain.de with challenge: DL2BLudZh4LUAuQdGnQeG5t0L9PQN1LfyfqtxhshpQs
[Mon Sep 13 13:11:58 CEST 2021] Detect root zone
[Mon Sep 13 13:11:58 CEST 2021] Retrying GET
[Mon Sep 13 13:11:58 CEST 2021] GET
[Mon Sep 13 13:11:58 CEST 2021] url='https://rV5jPL3dCT3E83%2fQeR%2bbMjSDLcEPkDoEAIKX6r5MLwiI5TFvLFoGUM2%2f5D4Uwmlf0MbKc6Vfh2Z2sUS9:aosAcQRuEsu0R6Utnk1cklzQYrgmqIPTpKihCtZaiqBvo8GqCeOZHIxgmslXCgzEAA6sgXvo%2b19QvaSN@127.0.0.1:443/api/bind/domain/get'
[Mon Sep 13 13:11:58 CEST 2021] timeout=
[Mon Sep 13 13:11:58 CEST 2021] displayError='1'
[Mon Sep 13 13:11:58 CEST 2021] _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L --insecure '
[Mon Sep 13 13:11:58 CEST 2021] ret='0'
[Mon Sep 13 13:11:58 CEST 2021] _hcode='0'
[Mon Sep 13 13:11:58 CEST 2021] h='domain.de'
[Mon Sep 13 13:11:58 CEST 2021] h='de'
[Mon Sep 13 13:11:58 CEST 2021] invalid domain
[Mon Sep 13 13:11:58 CEST 2021] Error add txt for domain:home.domain.de
[Mon Sep 13 13:11:58 CEST 2021] _on_issue_err
[Mon Sep 13 13:11:58 CEST 2021] Please check log file for more details: /var/log/acme.sh.log
[Mon Sep 13 13:11:58 CEST 2021] url='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A'
[Mon Sep 13 13:11:58 CEST 2021] payload='{}'
[Mon Sep 13 13:11:58 CEST 2021] Retrying post
[Mon Sep 13 13:11:58 CEST 2021] POST
[Mon Sep 13 13:11:58 CEST 2021] _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A'
[Mon Sep 13 13:11:58 CEST 2021] _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L '
[Mon Sep 13 13:11:59 CEST 2021] _ret='0'
[Mon Sep 13 13:11:59 CEST 2021] _hcode='0'
[Mon Sep 13 13:11:59 CEST 2021] code='200'
[Mon Sep 13 13:11:59 CEST 2021] url='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A'
[Mon Sep 13 13:11:59 CEST 2021] payload='{}'
[Mon Sep 13 13:11:59 CEST 2021] Retrying post
[Mon Sep 13 13:11:59 CEST 2021] POST
[Mon Sep 13 13:11:59 CEST 2021] _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/483058388/aWTs-A'
[Mon Sep 13 13:11:59 CEST 2021] _CURL='curl --silent --dump-header /var/etc/acme-client/home/http.header -L '
[Mon Sep 13 13:12:00 CEST 2021] _ret='0'
[Mon Sep 13 13:12:00 CEST 2021] _hcode='0'
[Mon Sep 13 13:12:00 CEST 2021] code='200'
[Mon Sep 13 13:12:00 CEST 2021] pid
[Mon Sep 13 13:12:00 CEST 2021] No need to restore nginx, skip.
[Mon Sep 13 13:12:00 CEST 2021] _clearupdns
[Mon Sep 13 13:12:00 CEST 2021] dns_entries
[Mon Sep 13 13:12:00 CEST 2021] skip dns.
Additional context
Environment
OPNsense 21.7.2_1-amd64
FreeBSD 12.1-RELEASE-p20-HBSD
OpenSSL 1.1.1l 24 Aug 2021
The text was updated successfully, but these errors were encountered: