Synology DS218 Let’s Encryptの証明書 tls-sni-01廃止後の自動更新

2023年9月23日

Synology DS218にて、証明書はLet’s Encryptのものを使用していました。

が、TLS-SNI-01認証に脆弱性が発見され、DNS-01 or HTTP-01 or TLS-ALPN-01を使うようにメールが来てました。

その対応について書きます。

 

背景

TLS-SNI-01認証に脆弱性があるので、Let’s Encryptではこの認証方式では証明書を発行しないよう変更があった。

いま取得した証明書の有効期限が切れた後、同じようにTLS-SNI-01で認証チャレンジしてもダメですよ、という通告。

 

これから起こる問題

証明書が更新できず、有効期限が切れる。

何かしら手を打たないと、証明書の有効期限が切れた時に怪しいSSL通信になります。

たしかユーザがOKすればブラウザ上はページは見れたような。

怪しいページはGoogleに消毒されるので、良いことはありません。

 

対応

結論は、ポート80番を開放すれば良い。

 

ポート解放の方法は、こちらをどうぞ。

https://www.hircos.work/blog/2019/01/20/052952/

 

調査

ACMEクライアントにcertbotを使用している場合は、アップデートすれば良いそうな。

DS218 の場合、DSMにお任せなのでどうしてるのか分かりません。

認証時のログを見てみようかと思いましたが、DSMでログを見る方法が分からず。

一応、/var/log/messages に残っていますが、「タイムアウトしたよ」しかありませんでした。

2019-03-15T03:43:16+09:00 nas00 synoscgi_SYNO.Core.Certificate.LetsEncrypt_1_renew[16228]: certificate.cpp:1448 handle le renew. [4zNqry]
2019-03-15T03:43:16+09:00 nas00 synoscgi_SYNO.Core.Certificate.LetsEncrypt_1_renew[16228]: certificate.cpp:1454 call le tool.
2019-03-15T03:43:47+09:00 nas00 synoscgi_SYNO.Core.Certificate.LetsEncrypt_1_renew[16228]: certificate.cpp:973 syno-letsencrypt failed. 101 [www.hircos.work: Fetching known/acme-challenge/Lop2MYDyoQvPyHw2WXwqheBo3ejeUGbO_FC_M95Uv2k: Timeout during connect (likely firewall problem)]
2019-03-15T03:43:47+09:00 nas00 synoscgi_SYNO.Core.Certificate.LetsEncrypt_1_renew[16228]: certificate.cpp:1458 Failed to renew Let’sEncrypt certificate. [101][www.hircos.work: Fetching known/acme-challenge/Lop2MYDyoQvPyHw2WXwqheBo3ejeUGbO_FC_M95Uv2k: Timeout during connect (likely firewall problem)]

たぶんDSMのアップデートで、ポート80番を経由する認証 (HTTP-01?)固定にしたんだと思います。

ちなみにバージョンは執筆時点で、DSM 6.2.1-23824 Update 6 です。

 

ログを見るときはこちらも参照。

# cat /var/log/messages

とかすればバーッと見れます。 いや見ても意味なかったって話なんですけどね。

 

対応前の状態

証明書を更新しようとすると、エラーが出る。

 

対応後

エラーも出ず、しれっと更新できるようになる。

(更新しました の画面もないので貼れません)

 

メールの内容

以下、警告のメールを載せておきます。

 

Action required: Let’s Encrypt certificate renewals

Hello,

Action may be required to prevent your Let’s Encrypt certificate renewals from
breaking.

If you already received a similar e-mail, this one contains updated information.

Your Let’s Encrypt client used ACME TLS-SNI-01 domain validation to issue a
certificate in the past 7 days. Below is a list of names and IP addresses
validated (max of one per account):

hircos.work (126.71.125.75) on 2019-03-09

TLS-SNI-01 validation is reaching end-of-life. It will stop working
permanently on March 13th, 2019. Any certificates issued before then will
continue to work for 90 days after their issuance date.

You need to update your ACME client to use an alternative validation method
(HTTP-01, DNS-01 or TLS-ALPN-01) before this date or your certificate renewals
will break and existing certificates will start to expire.

Our staging environment already has TLS-SNI-01 disabled, so if you’d like to
test whether your system will work after March 13, you can run against
staging: taging-environment/

If you’re a Certbot user, you can find more information here:
.org/t/how-to-stop-using-tls-sni-01-with-certbot/83210

Our forum has many threads on this topic. Please search to see if your question
has been answered, then open a new thread if it has not:
.org/

For more information about the TLS-SNI-01 end-of-life, please see our API
announcement:
.org/t/february-13-2019-end-of-life-for-all-tls-sni-01-validation-support/74209

Thank you,
Let’s Encrypt Staff

広告