CertBotでワイルドカード証明書を発行

CertBotがワイルドカード証明書に対応したので証明書を発行した。

DNS認証のみサポートのため、certbotの実行に加えDNSサーバのリソースレコードの修正を行う必要がある。
https://letsencrypt.jp/blog/2017-07-06.html

今回こちらを参考にした。

_mydomain="somedomain.local"
_mydomainadmin_email="somedomain-master@some.mail.addr"

git clone https://github.com/certbot/certbot.git
./certbot-auto certonly --manual -d "*.${_mydomain}" -m "${_mydomainadmin_email}" --agree-tos --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory

実行すると、メールアドレスをLEプロジェクトにメールアドレスを追加していいか聞かれる。
特段不要ならN。

-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o:

DNS認証のための情報が表示されるので、_acme-challenge.${_mydomain}のTXTレコードの値に
指示された値を設定する。

Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for ${_mydomain}

-------------------------------------------------------------------------------
Please deploy a DNS TXT record under the name
_acme-challenge.${_mydomain} with the following value:

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef0123456789_

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

設定が終わりEnterを押し、確認が終了したら/etc/letsencrypt/live/${_mydomain}以下に証明書や秘密鍵が保存される。

Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/${_mydomain}/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/${_mydomain}/privkey.pem
   Your cert will expire on 2018-06-15. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot-auto
   again. To non-interactively renew *all* of your certificates, run
   "certbot-auto renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - 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

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です