nasが使用するSSL証明書をmacで申請する
2024-04-13 09:49≈ 269字≈ 2分
Synology 独自の letsencrypt 証明書アプリケーションは http メソッドを使用するため、diskstation にポート 80 を使用するように要求する必要があります。ただし、ホーム ネットワークはデフォルトでポート 80 を閉じるため、どのように試しても失敗し、使用できるのはポート 80 のみです。ご自身のパソコンに来て応募してください。
一番面倒なのは3ヶ月ごとに更新する必要があり、毎回これをしなければならないこと…記録しておけば、世界中の注文を探す手間が省けます。
1.homebrewをインストールする
2.certbotをインストールする
1brew install certbot
- コマンドを実行します。たとえば、ドメイン名は *.example.com です。
1sudo certbot certonly --manual --preferred-challenges=dns -d "*.yourdomain.com"
- 残りは基本的にデフォルトで y を選択します。次の内容が表示されるまで、ドメイン名解決コンソールで TXT パーサーを追加する必要があります。追加後、約 10 分間待って Enter キーを押して次のステップに進みます。
1Please deploy a DNS TXT record under the name:
2
3_acme-challenge.example.com.
4
5with the following value:
6
7D1kOMANSfZG0HVM6-swGIqHrD87p7LGrnDLmoOclSuw
8
9Before continuing, verify the TXT record has been deployed. Depending on the DNS
10provider, this may take some time, from a few seconds to multiple minutes. You can
11check if it has finished deploying with aid of online tools, such as the Google
12Admin Toolbox: https://toolbox.googleapps.com/apps/dig/#TXT/_acme-challenge.wangboweb.site.
13Look for one or more bolded line(s) below the line ';ANSWER'. It should show the
14value(s) you've just added.
- 成功すると、次のプロンプトが表示されます。
1Successfully received certificate.
2Certificate is saved at: /etc/letsencrypt/live/example.com/fullchain.pem
3Key is saved at: /etc/letsencrypt/live/example.com/privkey.pem
4This certificate expires on 2022-12-23.
5These files will be updated when the certificate renews.
6
7NEXT STEPS:
8- This certificate will not be renewed automatically. Autorenewal of --manual certificates requires the use of an authentication hook script (--manual-auth-hook) but one was not provided. To renew this certificate, repeat this same certbot command before the certificate's expiry date.
9- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
10If you like Certbot, please consider supporting our work by:
11 * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
12 * Donating to EFF: https://eff.org/donate-le
デフォルトで生成された証明書は
/etc/letsencrypt/achive/example.com/ディレクトリにありますが、このディレクトリにはデフォルトでアクセス許可がありません。コピーする必要がある場合は、右クリックするだけで済みます。フォルダーをクリックして、概要を表示し、アクセス許可を設定して、fullchain.pem と privkey.pem の 2 つのファイルをコピーします。Synology-コントロール パネル-セキュリティ-証明書に対応する証明書ファイルをアップロードします。
