In most production environments, you want to use a certificate issued be your own PKI for deep packet inspection (DPI).
An existing Microsoft root CA can be used to issue a subordinate CA (sub CA) certificate that is installed as a DPI certificate on the FortiGate.
Complete the following steps to create your own sub CA certificate and use it for DPI:
- Create a Microsoft sub CA certificate
- Export the certificate and private key
- Import the certificate and private key into the FortiGate
- Configure a firewall policy for DPI
- Verify that the sub CA certificate is being used for DPI
The FortiGate firewall uses information in the original web server certificate, then issues a new certificate signed by the Microsoft DPI certificate. The FortiGate then sends this certificate with the issuing DPI certificate to the client's web browser when the SSL session is being established.
The browser verifies that the certificate was issued by a valid CA, then looks for the issuing CA of the Microsoft DPI certificate in its loca trusted root CA store to complete the path to trusted root CA.
The Microsoft CA root certificate is normally deployed to all client PCs in the Windows domain, so the client can complete the certificate path up to a trusted root CA. The FortiGate now controlsand can inspect the two HTTPS sessions: one with the external web server, and one with the client PC.
A Microsoft sub CA certificate can be created on a Microsoft CA server, or remotely using a web browser.
Creating a certificate remotely requires that the web enrollment option is configured on the Microsoft CA server. Remote certificate requests require HTTPS; requests are not allowed with HTTP.
- Open a web browser and go to one of the following URLs:
- Log in to a domain administrator account that has web enrollment rights.
- Click Request a certificate.
- Click advanced certificate request.
- Click Create and submit a request to this CA, then click Yes in the Web Access Confirmation warning.
- For the Certificate Template, select Subordinate Certification Authority.
- Enable Mark keys as exportable.
- Fill out the remaining information according to your security policy.
- Submit the request.
- Click Yes in the Web Access Confirmation warning.
- Click Install this certificate.
The certificate and private key are located in the current user's certificate store.
- Open the Microsoft Management Console (MMC) and add the Certificate Snap-in.
- Go to the user's certificate store to locate the sub CA certificate that you just installed.
- Right-click the certificate and select All Tasks > Export.
- Click Next to start the Microsoft Certificate Export Wizard.
- Follow the steps in the wizard:
- When asked, select Yes, export the private key.
- Only the PKCS #12 (.PFX) format is available, and it requires a password.
- When selecting the encryption type, select TripleDES-SHA1 if you are using an older version of FortiOS (5.6.9 and earlier). Otherwise, select AES256-SHA256.
- Complete the wizard, and save the DPI certificate to a local folder.
The certificate can be imported from the local computer using the GUI, or from a TFTP server using the CLI.
After importing the certificate, you can view it in the GUI to verify that it was successfully imported.
- Go to System > Certificates.
- Select Import > Local Certificate.
- Set Type to PKCS #12 Certificate.
- Click Upload and locate the certificate file.
- Enter the Password.
- Optionally, modify the Certificate Name.
- Click OK.
execute vpn certificate local import <certificate file name> <tftp ip address> <password>
- Go to System > Certificates. By default, the Certificate option is not visible, see Feature visibility for information.
- Locate the newly imported certificate in the table.
- Select the certificate and click View Details to view the certificate details.
The certificate is used in an SSL/SSH inspection profile that is then used in a firewall policy.
- Go to Security Profiles > SSL/SSH Inspection.
- Click Create New.
- Configure the inspection profile, selecting the new certificate
- Click Apply.
- Go to Policy & Objects > Firewall Policy.
- Create a new policy, or edit an existing policy.
- In the SSL Inspection field, select the new SSL inspection profile.
- Configure the remaining settings as needed.
- Click OK.
You can verify that the certificate is being used for resigning web server certificates when a user connects to an external HTTPS website.
- On a client PC that is behind the FortiGate, go to an external HTTPS website.
When connecting to the website, no certificate warning should be shown.
- In your web browser, view the certificate and certificate path.
The methods for doing this vary depending on the browser. See your browsers documentation for information.