Let’s Encrypt Wildcard-Zertifikate mit acme.sh (neues ECC oder RSA)

Installation

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
./acme.sh --install --accountemail "e-mail-adresse"
git clone https://github.com/Neilpang/acme.sh.git cd acme.sh ./acme.sh --install --accountemail "e-mail-adresse"
git clone https://github.com/Neilpang/acme.sh.git 
cd acme.sh 
./acme.sh --install --accountemail "e-mail-adresse"

DNS

Beim anfordern von Wildcard Zertifikaten wird die DNS-Challenge verwendet. Dabei wird ein TXT-Record bei der Domain hinzugefügt.

Mehrere Domain-Anbieter verfügen über API’s, welche DNS-Einstellungen verändern können.

Bsp. Netcup:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
export NC_Apikey="APIkey"
export NC_Apipw="APIpassword"
export NC_CID="Kunden-Nr"
export NC_Apikey="APIkey" export NC_Apipw="APIpassword" export NC_CID="Kunden-Nr"
export NC_Apikey="APIkey"
export NC_Apipw="APIpassword" 
export NC_CID="Kunden-Nr"

Zertifikat beantragen

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
acme.sh --issue --dns dns_netcup -d m-hofmann.eu -d '*.m-hofmann.eu' --dnssleep 660
acme.sh --issue --dns dns_netcup -d m-hofmann.eu -d '*.m-hofmann.eu' --dnssleep 660
acme.sh --issue --dns dns_netcup -d m-hofmann.eu -d '*.m-hofmann.eu' --dnssleep 660

Alternativ neues ECC verwenden

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
acme.sh --issue --dns dns_netcup -d m-hofmann.eu -d '*.m-hofmann.eu' --dnssleep 660 --ocsp-must-staple --keylength ec-384 --server letsencrypt
acme.sh --issue --dns dns_netcup -d m-hofmann.eu -d '*.m-hofmann.eu' --dnssleep 660 --ocsp-must-staple --keylength ec-384 --server letsencrypt
acme.sh --issue --dns dns_netcup -d m-hofmann.eu -d '*.m-hofmann.eu' --dnssleep 660 --ocsp-must-staple --keylength ec-384 --server  letsencrypt

Je nachdem welche TTL bei der Domain eingestellt ist muss der Wert bei dnssleep verändert werden, da sonst die Änderung noch nicht vorgenommen wurde und somit die Zertifikat Ausstellung fehlschlägt.

Zertifikat installieren

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
acme.sh --install-cert -d m-hofmann.eu -d '*.m-hofmann.eu' --cert-file /sslcerts/m-hofmann.eu/cert.pem --key-file /sslcerts/m-hofmann.eu/key.pem --fullchain-file /sslcerts/m-hofmann.eu/fullchain.pem --reloadcmd "service apache2 force-reload"
acme.sh --install-cert -d m-hofmann.eu -d '*.m-hofmann.eu' --cert-file /sslcerts/m-hofmann.eu/cert.pem --key-file /sslcerts/m-hofmann.eu/key.pem --fullchain-file /sslcerts/m-hofmann.eu/fullchain.pem --reloadcmd "service apache2 force-reload"
acme.sh --install-cert -d m-hofmann.eu -d '*.m-hofmann.eu' --cert-file /sslcerts/m-hofmann.eu/cert.pem --key-file /sslcerts/m-hofmann.eu/key.pem --fullchain-file /sslcerts/m-hofmann.eu/fullchain.pem --reloadcmd "service apache2 force-reload"

Alternativ neues ECC verwenden

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
acme.sh --install-cert -d m-hofmann.eu --ecc --cert-file /sslcerts/m-hofmann.eu/cert.pem --key-file /sslcerts/m-hofmann.eu/key.pem --fullchain-file /sslcerts/m-hofmann.eu/fullchain.pem --reloadcmd "service apache2 force-reload"
acme.sh --install-cert -d m-hofmann.eu --ecc --cert-file /sslcerts/m-hofmann.eu/cert.pem --key-file /sslcerts/m-hofmann.eu/key.pem --fullchain-file /sslcerts/m-hofmann.eu/fullchain.pem --reloadcmd "service apache2 force-reload"
acme.sh --install-cert -d m-hofmann.eu --ecc --cert-file /sslcerts/m-hofmann.eu/cert.pem --key-file /sslcerts/m-hofmann.eu/key.pem --fullchain-file /sslcerts/m-hofmann.eu/fullchain.pem --reloadcmd "service apache2 force-reload"

Mailcow

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
export DEPLOY_MAILCOW_PATH="/mailcow-pfad/"
acme.sh --deploy -d m-hofmann.eu -d '*.m-hofmann.eu' --deploy-hook mailcow
export DEPLOY_MAILCOW_PATH="/mailcow-pfad/" acme.sh --deploy -d m-hofmann.eu -d '*.m-hofmann.eu' --deploy-hook mailcow
export DEPLOY_MAILCOW_PATH="/mailcow-pfad/" 
acme.sh --deploy -d m-hofmann.eu -d '*.m-hofmann.eu' --deploy-hook mailcow

Schreibe einen Kommentar