Skip to content

Instantly share code, notes, and snippets.

@daryltucker
Last active February 26, 2021 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daryltucker/578b00420d1a05f31a6a90035670e247 to your computer and use it in GitHub Desktop.
Save daryltucker/578b00420d1a05f31a6a90035670e247 to your computer and use it in GitHub Desktop.
Add LetsEncrypt chains to FreeIPA for transition to proper CA (Feb 2021)
# Add LetsEncrypt chains to FreeIPA for transition to proper CA (Feb 2021)
# > The full certificate chain is not present in /etc/letsencrypt/live/${DOMAIN}/privkey.pem ...
# > The ipa-server-certinstall command failed.
# Grab Certificates from FreeIPA ( https://letsencrypt.org/certificates/ )
cd /tmp/
wget https://letsencrypt.org/certs/isrgrootx1.pem
wget https://letsencrypt.org/certs/letsencryptauthorityx3.pem
wget https://letsencrypt.org/certs/trustid-x3-root.pem
wget https://letsencrypt.org/certs/lets-encrypt-r3-cross-signed.pem
wget https://letsencrypt.org/certs/isrg-root-x1-cross-signed.pem
wget https://letsencrypt.org/certs/lets-encrypt-r3.pem
# Add Certificates to FreeIPA CA
ipa-cacert-manage install isrgrootx1.pem -n ISRGRootCAX1 -t C,,
ipa-cacert-manage install letsencryptauthorityx3.pem -n ISRGRootCAX3 -t C,,
ipa-cacert-manage install trustid-x3-root.pem -n TrustIDCAX3 -t C,,
ipa-cacert-manage install lets-encrypt-r3-cross-signed.pem -n LetsEncryptCAR3-cross -t C,,
ipa-cacert-manage install isrg-root-x1-cross-signed.pem -n ISRGRootCAX1-cross -t C,,
ipa-cacert-manage install lets-encrypt-r3.pem -n LetsEncryptCAR3 -t C,,
ipa-certupdate -v
# Add new domain LetsEncrypt Certificate
DOMAIN=sub.domain.tld
DIRMAN_PASSWORD=
KEY_PASSWORD=
ipa-server-certinstall -w -d /etc/letsencrypt/live/${DOMAIN}/fullchain.pem /etc/letsencrypt/live/${DOMAIN}/privkey.pem --dirman-password="${DIRMAN_PASSWORD}" --pin="${KEY_PASSWORD}"
ipactl restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment