How to do it...

After configuring the domain DNS servers to point to the DigitalOcean droplet, getting a certificate with Let's Encrypt is very simple.

  1. First, we need to install letsencrypt, which can be done using the following command:
apt install letsencrypt -y
  1. Next, to generate the certificate run the letsencrypt command, and follow the instructions:
letsencrypt certonly --manual -d zinitiative.com
  1. If all goes as expected, you should have your certificates under the /etc/letsencrypt/live/zinitiative.com directory:
root@Metasploit:~# ls /etc/letsencrypt/live/zinitiative.comcert.pem chain.pem fullchain.pem privkey.pem
  1. But before we can move on, we will have to create a unified file containing privkey.pem and cert.pem; for that we ...

Get Metasploit Penetration Testing Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.