How to add Custom SSL Certificate
If a custom SSL certificate for HTTPS traffic (IP Fabric main GUI) is required, follow this guide to change the certificate manually.
Important
Please ensure that the FQDN (DNS name) of the IP Fabric appliance is set as your custom certificate’s Subject Alternative Name
. Having the FQDN as the certificate’s Subject
or Common Name
is not sufficient.
-
Log in to the IP Fabric appliance’s CLI as
osadmin
and change toroot
:sudo su
-
Backup the previous server certificate and its private key:
mv /etc/nginx/ssl/server.crt /etc/nginx/ssl/server.crt.bkp mv /etc/nginx/ssl/server.key /etc/nginx/ssl/server.key.bkp
-
Upload the new certificate chain and private key to the
/etc/nginx/ssl/
directory- They have to have the same names as those previous ones –
server.crt
andserver.key
server.crt
needs to contain the new SSL certificate and full certificate chain in PEM formatserver.key
needs to contain the new SSL certificate’s private key in decrypted PEM format
- They have to have the same names as those previous ones –
-
The certificate chain in
server.crt
must have the following sequence:- Server Certificate
- Intermediate Certificate(s)
- Root Certificate
-
Make sure that the new
server.key
has the same owner and group (root:autoboss
) and permissions (-rw-r-----
) as the old one:chown root:autoboss /etc/nginx/ssl/server.key chmod 0640 /etc/nginx/ssl/server.key
-
Check if the
MD5
hashes forserver.crt
andserver.key
are identical:Example
root@ipfabric:~# openssl x509 -noout -modulus -in /etc/nginx/ssl/server.crt | openssl md5 (stdin)= 9dcfd46578b9dffe06ca0146607f6153 root@ipfabric:~# openssl rsa -noout -modulus -in /etc/nginx/ssl/server.key | openssl md5 (stdin)= 9dcfd46578b9dffe06ca0146607f6153
Danger
Do not proceed with the next step if the
MD5
hashes don’t match!If
MD5
hashes do not match, check if the certificate chain is in the correct order, or if the server private key corresponds to the server certificate. -
Restart
nginx
with the following command:systemctl restart nginx
-
Check if
nginx
is running:systemctl status nginx
-
Verify that the new certificate works correctly by visiting the IP Fabric main GUI in the browser.