certbot を使用して Let's Encrypt パンドメイン SSL 証明書を生成する

1.証明書更新エラー

  • 問題の説明
    SSL 証明書を更新すると、認証失敗が多すぎるというエラーが発生します

  • 原因分析

現在、更新対象のドメイン名は 1 時間あたりのトリガー失敗数が多すぎるため、検証に時間がかかります。

注: 公式ヒント: https://letsencrypt.org/docs/rate-limits/

実際、最も重要なことは、certbot を使用してあまりにも多くの無料証明書を申請していることです。パンドメイン証明書を申請することをお勧めします。

2. Let's Encrypt パンドメイン SSL 証明書アプリケーション

ここでも発行には Certbot を使用します。

公式 Web サイトのドキュメント: https://certbot.eff.org/docs/using.html

  • 公式 Web サイトのトップページを使用して直接インストールする方法では、最新の Let's Encrypt v2 API を使用できません。ここにパラメータを追加します
--server https://acme-v02.api.letsencrypt.org/directory
  • 現在のコマンドは次のとおりです。
certbot certonly --standalone -d *.example.com --server https://acme-v02.api.letsencrypt.org/directory
  • 結果プロンプト:
Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA. You may need to use an authenticator plugin that can do challenges over DNS.
  • その理由は、DNS 検証がないため、パラメーターを追加する必要があるためです。
--preferred-challenges dns
  • 公式ドキュメントを調べた結果、汎用ドメイン名には dns-01 検証が必要であることがわかりました。ドキュメントには、検証方法は自動的に検証できると記載されていますが、プラグインをインストールする必要があり、DNS サービス プロバイダーは次のサービス プロバイダーです。
cloudflare
cloudxns
digitalocean
dnsimple
dnsmadeeasy
google
luadns
nsone
rfc2136
route53
  • 私は無料の分析を使用していますが、自動的に検証する API がないため、パラメーターを追加します。
--manual
  • 要約すると、最後のコマンドは次のようになります。
certbot certonly --preferred-challenges dns --manual  -d *.example.com --server https://acme-v02.api.letsencrypt.org/directory

証明書発行時にTXTレコードの追加を求めるプロンプトが表示される

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Requesting a certificate for *.aattec.com
Performing the following challenges:
dns-01 challenge for aattec.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.aattec.com with the following value:

1q3iA_qE3i7ytfNU-xSs0x4mhfij4TXuoXXlxbrQDMQ

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

ドメイン名管理インターフェイスで TXT レコードを分析し、有効になるまで約 5 分待ってから Enter キーを押します。

発行が完了するまで待つだけです

Waiting for verification...
Resetting dropped connection: acme-v02.api.letsencrypt.org
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/aattec.com-0001/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/aattec.com-0001/privkey.pem
   Your certificate will expire on 2023-06-12. 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

おすすめ

転載: blog.csdn.net/cljdsc/article/details/129531017