By Manny Fernandez

August 30, 2022

Extracting Private Key from FortiGate Firewall

Extracting Private Key from FortiGate Firewall

Why would you need to export the private key when you create a CSR on the FortiGate.  If for instance, you are creating a .CSR to create a wildcard certificate and require the private key to be able to import the wildcard certificate into another server, you would need this.  Additionally, moving certificates from one firewall to another.

Here we are going to first create a CSR on the Fortigate.  You will need to have Certificates turned on under the Feature Visibility section.

Once you have enabled Certificate in the Feature Visibility, you will be able to click on the Create/Import tab at the top.  Then choose Generate CSR

Fill in the pertinent information for your CSR and add a password.

Once you are done, you should see your certificate listed with a status of pending.

Now, we are going to launch the CLI Console (or you can SSH separately to the FortiGate)

You are going to change your context to the vpn certificate local as above.  The next step will show you the private key.

Run the show full and it will display the private key

FortiGate SSH Public Key Authentication: Every Check It Runs and How to Lock It Down

FortiGate SSH Public Key Authentication: Every Check It Runs and How to Lock It Down

Set up FortiGate SSH public key login, learn every check the FortiGate runs during it, and close the password path that stays open by...

Read More
Is SCEP Viable Long Term? SCEP Alternatives, RFCs and a Migration Plan

Is SCEP Viable Long Term? SCEP Alternatives, RFCs and a Migration Plan

SCEP alternatives explained: RFC 8894 limits, EST, ACME device attestation and CMPv2, plus a step-by-step plan to retire SCEP safely.

Read More
EJBCA Internal CA: Deploy a Private PKI for Your Local Servers with Docker

EJBCA Internal CA: Deploy a Private PKI for Your Local Servers with Docker

Deploy an EJBCA internal CA in Docker with MariaDB, build a two-tier Root and Issuing CA, and issue trusted TLS certificates to local servers.

Read More