Seit Februar 2018 ist es mittels Lets Encrypt möglich, sogenannte Wildcard Zertifikate auszustellen. Dadurch ist es für Betreiber von mehreren Sub Domains einfacher geworden, da man nur mehr ein Zertifikat ausstellen muss, und nicht wie bisher für jede Sub Domain ein separates.

Was wird benötigt

Um ein Wildcard Zertifikat anzufordern benötigen wir folgendes

In meinem Beispiel verwende ich das Linux Subsystem von Windows 10 mit Ubuntu 18.04 und Certbot

Installation von Certbot

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt update
sudo apt install certbot

Anforderung des Zertifikates

In diesem Beispiel wird ein Wildcard Zertifikat für ra-networks.at erstellt.

Mit folgendem Befehl wird das Zertifikat angefordert.

sudo certbot certonly \
--server https://acme-v02.api.letsencrypt.org/directory \
--manual --preferred-challenges dns \
-d *.ra-networks.at -d ra-networks.at

Nachdem man die Abfrage bezüglich E-Mail etc. eingegeben und bestätigt hat, wird man aufgefordert die benötigten DNS Einträge zu setzen. 

------------------------------------------------------------------------------- Please deploy a DNS TXT record under the name _acme-challenge.ra-networks.at with the following value:

pES82Xwhs463jbG3Y0avfBvVEVTm578ILiIc4ATLHT0

Before continuing, verify the record is deployed.

Press Enter to Continue


Please deploy a DNS TXT record under the name _acme-challenge.ra-networks.at with the following value:

LLczhheu-UbjK47UOoNpKTzAW3H39HL8kHZHvIjVId4

Before continuing, verify the record is deployed.

Nachdem das durchgeführt wurde kann es etwas dauern bis die DNS Einträge aktiv werden. Daher erst nach einigen Minuten fortfahren. Wenn alles erfolgreich war kommt zum Schluss eine Erfolgsmeldung inkl. dem Pfad wo sich die Zertifikatsdateien befindet.

Press Enter to Continue Waiting for verification... Cleaning up challenges

IMPORTANT NOTES:

  • Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/ra-networks.at/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/ra-networks.at/privkey.pem Your cert will expire on 2018-10-04. To obtain a new or tweaked version of this certificate in the future, simply run certbot again. To non-interactively renew *all* of your certificates, run "certbot renew"
  • Your account credentials have been saved in your Certbot configuration directory at /etc/letsencrypt. You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained by Certbot so making regular backups of this folder is ideal.
  • 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

Zertifikat wieder zurückziehen

Sollte es einmal nötig sein ein erstelltes Zertifikat für ungültig zu erklären bzw. dem Zertifikat das Vertrauen zu entziehen, kann man dies mit folgendem Befehl bewerkstelligen.

certbot revoke --cert-path /PATH/TO/cert.pem --key-path /PATH/TO/key.pem