Cara Request Certificate ke Let's Encrypt



Let's encrypt merupakan salah satu provider yang menyediakan SSL secara gratis

Untuk langkah-langkah nya cukup simple untuk mendapatkan sertifikat nya

Tool untuk request sertifikat ke let's encrypt menggunakan certbot

Untuk tutorial kali ini akan menginstall certbot melalui Python virtualenvironment, pastikan di laptop sudah ada Python, untuk versi bisa menyesuaikan kemudian jalankan perintah berikut:

Install Certbot bisa melalui python-PIP




python3.8 -m venv virtualenv


source virtualenv/bin/active


pip3 install certbot







Untuk mendapatkan sertifikat dari Let's Encrypt, server let's encrypt memvalidasi bahwa Anda mengontrol nama domain dalam sertifikat tersebut menggunakan "challenge", sebagaimana ditentukan oleh standar ACME. Ada beberapa langkah bisa menggunkan DNS dan HTTP namun untuk kali ini menggunakan DNS, buatlah record sesuai dengan yang ada pada hasil perintah berikut:




certbot certonly --config-dir . --work-dir . --logs-dir . --manual -d www.example.com --preferred-challenges dns




Saving debug log to /Users/nasohi.ciptandani/PY-VIRTUALENV/letsencrypt.log

Requesting a certificate for www.example.com




- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Please deploy a DNS TXT record under the name:




_acme-challenge.www.example.com.




with the following value:




abcdefghjklmnopqrztuvwxyz




Before continuing, verify the TXT record has been deployed. Depending on the DNS

provider, this may take some time, from a few seconds to multiple minutes. You can

check if it has finished deploying with aid of online tools, such as the Google

Admin Toolbox: https://toolbox.googleapps.com/apps/dig/#TXT/_acme-challenge.www.example.com.

Look for one or more bolded line(s) below the line ';ANSWER'. It should show the

value(s) you've just added.




- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -











Successfully received certificate.

Certificate is saved at: /Users/nasohi.ciptandani/CODE/PY-VIRTUALENV/live/example.com/fullchain.pem

Key is saved at: /Users/nasohi.ciptandani/CODE/PY-VIRTUALENV/live/example.com/privkey.pem

This certificate expires on 2024-02-21.

These files will be updated when the certificate renews.




NEXT STEPS:

- 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.




- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -







Tunggu beberapa saat untuk DNS propagasi kurang lebih 15 menitan kemudian tekan enter




kalau masih gagal ditengah command nya kerena TXT record belum bisa diakses oleh provider let's encrypt bisa dijalankan berulang juga. Namun pastikan TXT record sesuai yang di minta oleh lets encrypt




Sudah deh, sertifikat akan didapatkan di folder dimana menjalakan perintah tersebut, dan bisa dipakai di server yang mau kita proteksi dengan SSL.




File certifikate berada di folder live/your_domain_name/












Refs:

https://letsencrypt.org/docs/challenge-types/

Komentar

Postingan populer dari blog ini

Pembahasan IT Network Systems Administration Module A DNS (Forward Zone, Reverse Zone, CNAME, MX, Split View)

Cara memahami dan menghafal model OSI dengan analogi

Table of Contents