Creating SSL Certs with FreeIPA
This is how you create a host based SSL cert in FreeIPA. You’d use it for something like a web server. This will be
automatically renewed before it expires. NOTE: make sure hostname returns the fqdn, before doing this. If it doesn’t use hostnamectl to set it that way.
sudo -i
hostnamectl set-hostname $(hostname -f)
kinit denebeim
ipa service-add HTTP/$(hostname -f)
ipa service-add-host --hosts=$(hostname -f) HTTP/$(hostname -f)
mkdir -p /etc/pki/tls/{certs,private}
ipa-getcert request -r -w \
-f "/etc/pki/tls/certs/$(hostname -f)".crt \
-k "/etc/pki/tls/private/$(hostname -f)".key \
-N CN="$(hostname -f)" -D "$(hostname -f)" -K HTTP/"$(hostname -f)"
I chose to put it in /etc/pki/tls because the other place you might put it /etc/ssl is full of symbolic links and stuff and mostly CA certs in ubuntu.
No comments:
Post a Comment