<div dir="ltr">Subject: I have finally figured out how to export Private Key from Fortigate firewall and successfully install Godaddy Wildcard SSL certificate in UniFi Cloud Key Gen 2 Plus Network Controller<br><br>Good day from Singapore,<br><br>Author: Mr. Turritopsis Dohrnii Teo En Ming<br>Country: Singapore<br>Date: 26 Oct 2022 Wednesday<br><br>I have finally figured out how to export Private Key from Fortigate firewall and successfully install Godaddy Wildcard SSL certificate in UniFi Cloud Key Gen 2 Plus Network Controller because I have finally found the correct reference guides! Please refer to the following list.<br><br>Reference Guides<br>=================<br><br>Youtube video: Ubiquiti Networks UniFi OS SSL Certificate Installation<br>Link: <a href="https://www.youtube.com/watch?v=WxhY71ebc9o">https://www.youtube.com/watch?v=WxhY71ebc9o</a><br><br>Guide: Extracting Private Key from FortiGate Firewall<br>Link: <a href="https://infosecmonkey.com/extracting-private-key-from-fortigate-firewall/">https://infosecmonkey.com/extracting-private-key-from-fortigate-firewall/</a><br><br>Guide: Extracting private key from FortiGate SSL Certificates<br>Link: <a href="https://www.linkedin.com/pulse/extracting-private-key-from-fortigate-ssl-kuganesan-srijeyanthan">https://www.linkedin.com/pulse/extracting-private-key-from-fortigate-ssl-kuganesan-srijeyanthan</a><br><br>Guide: How to decrypt an RSA private key and then use it in kyrtool to merge the SSL certificates.<br>Link: <a href="https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0098900">https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0098900</a><br><br>Guide: How to Fix an Encrypted SSL Private Key<br>Link: <a href="https://serverpilot.io/docs/how-to-fix-an-encrypted-ssl-private-key/">https://serverpilot.io/docs/how-to-fix-an-encrypted-ssl-private-key/</a><br><br>DETAILED INSTRUCTIONS FROM TEO EN MING<br>=======================================<br><br>Login to the Fortigate 201F firewall and run the following commands using CLI.<br><br>config vpn certificate local<br><br>edit <certificate-name><br><br>show full<br><br>You will see something like:<br><br>-----BEGIN ENCRYPTED PRIVATE KEY-----<br><---snipped---><br>-----END ENCRYPTED PRIVATE KEY-----<br><br>Save the above encrypted private key as encrypted.txt in notepad or notepad++ in Windows Server.<br><br>Then decrypt the encrypted private key using the openssl linux command.<br><br>openssl rsa -in encrypted.txt -out plain.txt<br><br>Download and install Keystore Explorer in Windows Server.<br><br>Launch KeyStore Explorer 5.5.1.<br><br>Click Create a new KeyStore.<br><br>Click JKS.<br><br>Click OK.<br><br>Click Import Key Pair.<br><br>Click OpenSSL.<br><br>Click OK.<br><br>Uncheck Encrypted Private Key.<br><br>Browse OpenSSL Private Key File. (plain.txt)<br><br>Browse Certificate(s) File. (chain.crt generated from Godaddy Wildcard SSL certificate)<br><br>Click Import.<br><br>Enter Alias: unifi<br><br>Click OK.<br><br>Enter New Password: aircontrolenterprise<br><br>Confirm New Password: aircontrolenterprise<br><br>Click OK.<br><br>Click OK.<br><br>Click Save.<br><br>Enter New Password: aircontrolenterprise<br><br>Confirm New Password: aircontrolenterprise<br><br>Save KeyStore As: keystore (filename without extension)<br><br>Click Save.<br><br>Launch WinSCP in Windows Server.<br><br>Transfer keystore file to /srv/unifi/data.<br><br>Browse to /data/unifi-core/config. Create backup folder.<br><br>Move default/original unifi-core.crt and unifi-core.key to above backup folder.<br><br>Upload plain.txt to /data/unifi-core/config as unifi-core.key.<br><br>Upload chain.crt (generated from Godaddy Wildcard SSL certificate) to /data/unifi-core/config as unifi-core.crt<br><br>Reboot UniFi Cloud Key Gen 2 Plus network controller. You MUST reboot for it to take effect!<br><br>SUCCESS!<br><br>Browse to <a href="https://cloudkey.teo-en-ming-corp.com">https://cloudkey.teo-en-ming-corp.com</a> on your favorite web browser. You should see a padlock icon on the browser address bar. This means that the Wildcard SSL certificate was installed correctly.<br><br>I started doing it at 5.00 PM and completed doing it at 6.00 PM Singapore time on 26 Oct 2022 Wednesday.<br><br>Regards,<br><br>Mr. Turritopsis Dohrnii Teo En Ming<br>Targeted Individual in Singapore<br>Blogs:<br><a href="https://tdtemcerts.blogspot.com">https://tdtemcerts.blogspot.com</a><br><a href="https://tdtemcerts.wordpress.com">https://tdtemcerts.wordpress.com</a><br></div>