標題:讓我們加密:使用 Certbot 的通配符憑證

發表:真實

說明:Let's Encrypt 使用 DNS-01 質詢透過 ACMEv2 支援通配符憑證,該質詢於 2018 年 3 月 13 日開始。其用戶端 Certbot 提供 --manual 選項來執行此操作。我寫瞭如何使用 Certbot 產生通配符憑證。

標籤: LetsEncrypt、 certbot、 憑證、 安全

封面圖片:https://thepracticaldev.s3.amazonaws.com/i/wxi7s3zr664nv3u5d2ig.jpg

系列:OpenBSD TLS 連接


* 封面圖片最初由 OpenClipart-Vectors 製作並經過精心編輯。


介紹

Let's Encrypt 透過 ACMEv2 支援通配符憑證 DNS-01 挑戰,[於2018 年3 月13 日開始](https://letsencrypt.org/2017/ 07 /06/wildcard-certificates-coming-jan-2018.html)。

Certbot,其客戶端,提供「--manual」選項來[執行](https://certbot.eff.org/faq/#does-let- s -加密-頒發-通配符-憑證)。

我真誠地感謝他們。

我寫瞭如何使用 Certbot 產生通配符憑證。

這是一個非常簡單的任務:)

此外,所需要做的就是將 Certbot 指定的 TXT 記錄新增至 DNS 伺服器。

* 注意:[有必要每 90 天更新一次 Let's Encrypt 的憑證](https://letsencrypt.org/docs/faq/#what-is-the-lifetime-for-let-s-encrypt-certificates- for -how-long-are-they-valid),[每次續約時都需要新的TXT 記錄](https://community.letsencrypt.org/t/how-to-renew-wildcard-cert-with- cert -機器人自動/60723)。

身體

環境

教程

命令是這樣的:

# certbot certonly --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory --manual-public-ip-logging-ok -d '*.<your.domain>' -d <your.domain>

確保引用 *.<your.domain> 以避免錯誤「未找到符合專案:*.\<your.domain>」。

* 注意:-d *.<your.domain>-d <your.domain> 的順序似乎不重要。

以下是「certonly」選項與單一憑證的比較:

- --webroot -w <dir-path>
+ --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory --manual-public-ip-logging-ok

此外,其命令列選項的詳細資訊請參閱此處

然後,命令回覆:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for <your.domain>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.<your.domain> with the following value:

<acme-challenge-value>

Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue

配置 DNS 伺服器以將記錄新增至您的網域。

記錄是這樣的:

|哪裡 |什麼 |

| -----| --- |

|類型 |文字 |

|名稱 | _acme-挑戰 |

|價值| \<acme-challenge-value> 指令顯示如上 |

* 注意:您可能會在這裡等待一段時間以進行 DNS 傳播。

然後按 Enter 鍵。

Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/<your.domain>/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/<your.domain>/privkey.pem
   Your cert will expire on 2019-08-01. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

完畢 : )

結論

因此,我獲得了通配符憑證並應用於我的幾台伺服器。

今天它運作良好,我的工作量減少了,安全性幾乎相同。

如果您正在尋找如何將 Let's Encrypt 的憑證應用到 OpenBSD httpd 伺服器,我在這裡寫道:

{% 連結 nabbisen/lets-encrypt-certbot-for-openbsds-httpd-3ofd %}

感謝您的閱讀。

快樂安全。


原文出處:https://dev.to/nabbisen/let-s-encrypt-wildcard-certificate-with-certbot-plo


共有 0 則留言