LoginSignup
19
18

More than 5 years have passed since last update.

Let's Encryptから証明書を取得してAWS ELBに組み込む

Last updated at Posted at 2015-12-07

Let's EncryptがPublicBetaになりましたので、さっそく組み込み。
https://letsencrypt.org/2015/12/03/entering-public-beta.html

まずは個人環境で実装してます。
商用に組み込むのはお勧めしません。

Let's Encrypt

無償で信頼された証明書を取得し使用できるサービス
https://letsencrypt.org/about/

AmazonLinuxで証明書を取得

例えばwww.hogehoge.com の証明書を取得する場合
サーバ上で認証する必要があるため、
証明書取得用のサーバを用意する方法が環境を汚さないので良いと思います。

www.hogehoge.com のDNSのを作成したインスタンスのEIPに向けます。
インスタンスのセキュリティグループは80/443をフル解放しておきます。

パッケージ

sudo yum install git libffi-devel puppet libffi-devel puppet httpd24

証明書取得

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto --server https://acme-v01.api.letsencrypt.org/directory auth
IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at
   /etc/letsencrypt/live/www.hogehoge.com/fullchain.pem. Your
   cert will expire on 2016-03-06. To obtain a new version of the
   certificate in the future, simply run Let's Encrypt again.
 - If like Let's Encrypt, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

中間証明書

AWSのELBに組み込む際に、中間証明書が上手く認証できなかった。
記載する順番も変えたか駄目だったので、直接キーを探して組み込んだら上手く行きました。

https://letsencrypt.org/certificates/
https://www.identrust.com/certificates/trustid/root-download-x3.html

自己証明書使うぐらいなら、これでよいかと思いました。

19
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
18