I am close to success - trying to stay positive - but have met a few obstacles.
Here's my setup:
- Ubuntu 19.10
- Nginx 1.16.1
- Sagemcom router from my cable provider
- Certbot 0.40.1
What I've done so far:
- I'm in the process of setting up an nginx server using DuckDNS with tanghus.duckdns.org as domain.
- I have first followed the guide at https://certbot.eff.org/lets-encrypt/ubuntuother-nginx using
sudo /usr/local/bin/certbot-auto --nginx
. - First obstacle was a closed 443 port. I followed advice from @jmorahan in another thread and ran the (edited for token) scripts from there.
- This led me to the next obstacle:
Running manual-auth-hook command: /usr/local/bin/auth.sh
manual-auth-hook command "/usr/local/bin/auth.sh" returned error code 1
Waiting for verification...
Challenge failed for domain tanghus.duckdns.org
dns-01 challenge for tanghus.duckdns.org
Cleaning up challenges
Running manual-cleanup-hook command: /usr/local/bin/cleanup.sh
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: tanghus.duckdns.org
Type: unauthorized
Detail: Incorrect TXT record "" found at
_acme-challenge.tanghus.duckdns.org
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
I must admit that I can't really grasp how this _acme-challenge and DNS records is supposed to work
/etc/nginx/sites-available/tanghus.net (linked to /etc/nginx/sites-enabled/tanghus.net):
server {
listen 80;
#listen [::]:443 ssl;
root /var/www/tanghus;
index index.html;
server_name tanghus.duckdns.org;
}
From /var/log/letsencrypt/letsencrypt.log:
2019-11-19 12:47:56,819:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "POST /acme/authz-v3/1308657188 HTTP/1.1" 200 996
2019-11-19 12:47:56,821:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Tue, 19 Nov 2019 11:47:56 GMT
Content-Type: application/json
Content-Length: 996
Connection: keep-alive
Boulder-Requester: 72092529
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: 0001dxX7J-B2EcJoe-IdEFu694VBpqXQdJr3ogVLeR-4_zc
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
{
"identifier": {
"type": "dns",
"value": "tanghus.duckdns.org"
},
"status": "invalid",
"expires": "2019-11-26T11:47:37Z",
"challenges": [
{
"type": "http-01",
"status": "invalid",
"url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/1308657188/vJW1nA",
"token": "r_2Sx0iulCL_vOKxdlbOoX-AqQuqnXq7PW0n8YWoC0o"
},
{
"type": "dns-01",
"status": "invalid",
"error": {
"type": "urn:ietf:params:acme:error:unauthorized",
"detail": "Incorrect TXT record \"\" found at _acme-challenge.tanghus.duckdns.org",
"status": 403
},
"url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/1308657188/WVL9XQ",
"token": "r_2Sx0iulCL_vOKxdlbOoX-AqQuqnXq7PW0n8YWoC0o"
},
{
"type": "tls-alpn-01",
"status": "invalid",
"url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/1308657188/epRg5Q",
"token": "r_2Sx0iulCL_vOKxdlbOoX-AqQuqnXq7PW0n8YWoC0o"
}
]
}
2019-11-19 12:47:56,822:DEBUG:acme.client:Storing nonce: 0001dxX7J-B2EcJoe-IdEFu694VBpqXQdJr3ogVLeR-4_zc
2019-11-19 12:47:56,824:WARNING:certbot.auth_handler:Challenge failed for domain tanghus.duckdns.org
2019-11-19 12:47:56,826:INFO:certbot.auth_handler:dns-01 challenge for tanghus.duckdns.org
2019-11-19 12:47:56,827:DEBUG:certbot.reporter:Reporting to user: The following errors were reported by the server:
Domain: tanghus.duckdns.org
Type: unauthorized
Detail: Incorrect TXT record "" found at _acme-challenge.tanghus.duckdns.org
To fix these errors, please make sure that your domain name was entered correctly and the DNS A/AAAA record(s) for that domain contain(s) the right IP address.
2019-11-19 12:47:56,828:DEBUG:certbot.error_handler:Encountered exception:
Traceback (most recent call last):
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/auth_handler.py", line 91, in handle_authorizations
self._poll_authorizations(authzrs, max_retries, best_effort)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/auth_handler.py", line 180, in _poll_authorizations
raise errors.AuthorizationError('Some challenges have failed.')
AuthorizationError: Some challenges have failed.
2019-11-19 12:47:56,828:DEBUG:certbot.error_handler:Calling registered functions
2019-11-19 12:47:56,828:INFO:certbot.auth_handler:Cleaning up challenges
2019-11-19 12:47:56,830:INFO:certbot.hooks:Running manual-cleanup-hook command: /usr/local/bin/cleanup.sh
2019-11-19 12:47:57,701:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 11, in <module>
sys.exit(main())
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 1378, in main
return config.func(config, plugins)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 1265, in certonly
lineage = _get_and_save_cert(le_client, config, domains, certname, lineage)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 121, in _get_and_save_cert
lineage = le_client.obtain_and_enroll_certificate(domains, certname)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 417, in obtain_and_enroll_certificate
cert, chain, key, _ = self.obtain_certificate(domains)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 348, in obtain_certificate
orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 396, in _get_order_and_authorizations
authzr = self.auth_handler.handle_authorizations(orderr, best_effort)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/auth_handler.py", line 91, in handle_authorizations
self._poll_authorizations(authzrs, max_retries, best_effort)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/auth_handler.py", line 180, in _poll_authorizations
raise errors.AuthorizationError('Some challenges have failed.')
AuthorizationError: Some challenges have failed.
Have I missed anything relevant?
Maybe:
; <<>> DiG 9.12.3-P4 <<>> tanghus.duckdns.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47633
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 09eebc52674c9a854cd9dbbb5dd3eb3e6365618c921fe128 (good)
;; QUESTION SECTION:
;tanghus.duckdns.org. IN A
;; ANSWER SECTION:
tanghus.duckdns.org. 60 IN A 87.50.31.25
;; Query time: 315 msec
;; SERVER: 217.11.48.200#53(217.11.48.200)
;; WHEN: Tue Nov 19 14:16:46 CET 2019
;; MSG SIZE rcvd: 92
https://dnsspy.io/scan/tanghus.duckdns.org
returns:
Oops! No nameservers found.
We tried to query tanghus.duckdns.org for NS records (your nameservers), but couldn't find any. Does the domain you've added have any NS records?
Any advice on how to proceed will be greatly appreciated