tag:crieit.net,2005:https://crieit.net/tags/certbot/feed 「certbot」の記事 - Crieit Crieitでタグ「certbot」に投稿された最近の記事 2020-02-04T14:36:45+09:00 https://crieit.net/tags/certbot/feed tag:crieit.net,2005:PublicArticle/15708 2020-02-04T14:05:06+09:00 2020-02-04T14:36:45+09:00 https://crieit.net/posts/Update-your-client-software-to-continue-using-Let-s-Encrypt "Update your client software to continue using Let's Encrypt" <p>Let's Encryptからそんなメールが来たあなた、さてはサーバソフトウェアの更新をサボっていますね?ぼくもです😀</p> <p>これが来た人が何をしないといけないのかをまとめました。簡単に言うと certbot を更新しましょう</p> <h1 id="何言われてるの?"><a href="#%E4%BD%95%E8%A8%80%E3%82%8F%E3%82%8C%E3%81%A6%E3%82%8B%E3%81%AE%EF%BC%9F">何言われてるの?</a></h1> <blockquote> <p>According to our records, the software client you're using to get Let's<br /> Encrypt TLS/SSL certificates issued or renewed at least one HTTPS certificate<br /> in the past two weeks using the ACMEv1 protocol. Your client's IP address was:</p> <p><strong><em>.</em></strong>.<strong><em>.</em></strong></p> </blockquote> <p>ここ二週間の記録によると、Let's Encrypt TLS/SSL 証明書を取るために使っているクライアント、ACMEv1 プロトコルを使ってるようです。IPアドレスはこれ</p> <blockquote> <p>Beginning June 1, 2020, we will stop allowing new domains to validate using<br /> the ACMEv1 protocol.<br /> You should upgrade to an ACMEv2 compatible client before then, or certificate issuance will fail. For most people, simply upgrading to the latest version of your existing client will suffice.</p> </blockquote> <p>2020/01/01から、ACMEv1プロトコルでのドメイン認証は停止されます。<br /> ACMEv2を使うクライアントソフトウェアに移行しないと、証明書が更新できなくなります。大多数の人にとっては、単に使っているクライアントソフトウェアを更新すればよいはずです。</p> <p>(訳注 それ以外の人についての説明があるけど、そんな人はこの記事読まないので中略)</p> <blockquote> <p>ACMEv1 API deprecation details can be found in our community forum:<br /> <a target="_blank" rel="nofollow noopener" href="https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1">https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1</a></p> </blockquote> <p>ACMEv1 APIの廃止についての詳細はコミュニティフォーラムで見ることが出来ます。<br /> <a target="_blank" rel="nofollow noopener" href="https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1">https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1</a><br /> (訳注 廃止の進め方の話題なので、ぼくらが何をするかの説明は載ってないぽい)</p> <h1 id="どうすりゃいいの?"><a href="#%E3%81%A9%E3%81%86%E3%81%99%E3%82%8A%E3%82%83%E3%81%84%E3%81%84%E3%81%AE%EF%BC%9F">どうすりゃいいの?</a></h1> <p>certbotを更新すればOKです。</p> <p>ぼくの使っているCentOSだと</p> <pre><code>$ sudo yum update certbot : ================================================================================================= Package Arch Version ================================================================================================= Updating: certbot noarch 1.0.0-1.el7 python-requests noarch 2.6.0-8.el7_7 : Updating : certbot-1.0.0-1.el7.noarch Complete! </code></pre> <p>という感じでした。</p> <p>certbotには<a target="_blank" rel="nofollow noopener" href="https://qiita.com/mogya/items/f43334fd531888c4774f">自動更新のためのtimerがついている</a>ので、これを使っている人は念の為リロードしておきましょう</p> <pre><code>$ sudo systemctl daemon-reload </code></pre> <p>自分でcrontab書いた人は自前でなんとかしてね。せっかくcertbotがtimerを用意してくれているので、こっちを使うことをおすすめするよ。</p> <h1 id="動作確認"><a href="#%E5%8B%95%E4%BD%9C%E7%A2%BA%E8%AA%8D">動作確認</a></h1> <p>一回手動で動かしておけばいいかなと。</p> <pre><code>$ sudo systemctl start certbot-renew $ sudo systemctl status certbot-renew * certbot-renew.service - This service automatically renews any certbot certificates found Loaded: loaded (/usr/lib/systemd/system/certbot-renew.service; static; vendor preset: disabled) Active: inactive (dead) since Tue 2020-02-04 13:06:36 JST; Process: 27876 ExecStart=/usr/bin/certbot renew ... Main PID: 27876 (code=exited, status=0/SUCCESS) Feb 04 13:06:36 linode10.mogya.com certbot[27876]: Processing /etc/letsencrypt/renewal/oasis.mogya.com.conf Feb 04 13:06:36 linode10.mogya.com certbot[27876]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Feb 04 13:06:36 linode10.mogya.com certbot[27876]: Cert not yet due for renewalbot-renew.timer Feb 04 13:06:36 linode10.mogya.com certbot[27876]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Feb 04 13:06:36 linode10.mogya.com certbot[27876]: The following certs are not due for renewal yet: Feb 04 13:06:36 linode10.mogya.com certbot[27876]: /etc/letsencrypt/live/oasis.mogya.com/fullchain.pem expires on 2020-04-09 (skipped) Feb 04 13:06:36 linode10.mogya.com certbot[27876]: No renewals were attempted. Feb 04 13:06:36 linode10.mogya.com certbot[27876]: No hooks were run. Feb 04 13:06:36 linode10.mogya.com certbot[27876]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Feb 04 13:06:36 linode10.mogya.com systemd[1]: Started This service automatically renews any certbot certificates found. </code></pre> <p>こんな感じで、"Cert not yet"(期限がまだだから更新しなかったよ)的なログが出れば大丈夫かと思います。</p> <p>心配な人は、expires on の日付にリマインダを仕掛けておいて動作確認しましょう</p> <h1 id="その他"><a href="#%E3%81%9D%E3%81%AE%E4%BB%96">その他</a></h1> <p> たまにルータなんかが勝手にLet's Encrypt にアクセスして証明書をとってくる仕組みになっているものがあるらしいです。<br /> 自分で証明書を取得した記憶がないのにこのメールを受け取った人は、この記事の対象じゃないので、ルータメーカーのサポートに相談するのがいいんじゃないかと思います。</p> daisuke furukawa