大网数据广告活动
服务器运维问答

Wildcard SSL with LetsEncrypt gives error

· 52CE 我爱测

I want to create wildcard SSL for my website via LetsEncrypt . I followed the instruction and after running Certbot , it gives me a DNS challenge and says: Please deploy a DNS TXT record under the name _acme-challenge.db.example.…

问题原文

原帖链接 · Fcoder · CC BY-SA 4.0

I want to create wildcard SSL for my website via LetsEncrypt. I followed the instruction and after running Certbot, it gives me a DNS challenge and says:

Please deploy a DNS TXT record under the name

_acme-challenge.db.example.com with the following value:
 jn324jr348r342bhr234hrou234nbr4324fj34r

Also db.example.com is inside /etc/bind/.

What I do is that opened db.example.com and at the bottom line add this:

_acme-challenge.db.example.com 3600 IN TXT "jn324jr348r342bhr234hrou234nbr4324fj34r"

But whe i check it like this:

nslookup -type=TXT _acme-challenge.example.com

It gives me this error:

 - The following errors were reported by the server:                           

   Domain: db.example.com                                                
   Type:   dns                                                                 
   Detail: DNS problem: NXDOMAIN looking up TXT for                            
   _acme-challenge.db.example.com - check that a DNS record              
   exists for this domain                                                      
ubuntu@me-1:/etc/bind$ nslookup -type=TXT _acme-challenge.example.com
Server:         127.0.0.53                                                     
Address:        127.0.0.53#53                                                  

** server can't find _acme-challenge.example.com: NXDOMAIN

And when I run Certbot also get an error:

Some challenges have failed.                                                   

IMPORTANT NOTES:                                                               
 - The following errors were reported by the server:                           

   Domain: db.example.com                                                
   Type:   dns                                                                 
   Detail: DNS problem: NXDOMAIN looking up TXT for                            
   _acme-challenge.db.example.com - check that a DNS record                                           
   exists for this domain

What wrong Im doing here?

已采纳解答

原帖链接 · Radosław Serba · CC BY-SA 4.0

Please note you have to wait for a while until changes in your DNS zone will be updated on servers worldwide. Your problem is that you're trying to check if changes are applied to the DNS too fast. There is a good way out from this case and it requires using DNS provider's API. If you use for instance OVH, you can use their API for DNS changes and certbot will be able to check changes immediately. There is a list of all API plugins here: https://certbot.eff.org/docs/using.html?highlight=dns#dns-plugins

If your DNS provider doesn't support this, try moving your DNS zone to Cloudflare. It's super easy and you'll get that service for free. Also, by using DNS API you'll be able to renew wildcard certificates for free by leaving a single command in cron like this:

0  1   20 * *   root    certbot certonly --non-interactive -d example.com -d '*.example.com' --dns-cloudflare --dns-cloudflare-credentials /my/secret/api/key/location

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-05-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。