In this recipe, you will prevent users from receiving a security certificate warning when your FortiGate applies full SSL inspection to incoming traffic.
When full SSL inspection is used, your FortiGate impersonates the recipient of the originating SSL session, then decrypts and inspects the content. The FortiGate then re-encrypts the content, creates a new SSL session between the FortiGate and the recipient by impersonating the sender, and sends the content to the end user. This is the same process used in “man-in-the-middle” attacks, which is why a user’s device may show a security certificate warning.
For more information about SSL inspection, see Why you should use SSL inspection.
Often, when a user receives a security certificate warning, they simply select Continue without understanding why the error is occurring. To avoid encouraging this habit, you can prevent the warning from appearing in the first place.
There are two methods for doing this, depending on whether you are using your FortiGate’s default certificate or using a self-signed certificate.
Find this recipe for other [glossary_exclude]FortiOS[/glossary_exclude] versions
5.2 | 5.4
Using the default certificate
All FortiGates have a default certificate that is used for full SSL inspection. This certificate is also used in the default deep-inspection profile. To prevent your users from seeing certificate warnings, you can install this certificate on your users’ devices.
If you have the right environment, you can distribute the certificate and have it installed automatically.
1. Downloading the certificate used for full SSL inspection
|
Go to Security Profiles > SSL/SSH Inspection. Use the dropdown menu in the top right corner to select deep-inspection, the profile used to apply full SSL inspection.
|
|
The default FortiGate certificate is listed as the CA Certificate. Select Download Certificate.
|
|
2. Installing the certificate on the user’s browser
|
Internet Explorer, Chrome, and Safari (on Windows or Mac OS):
The above browsers use the operating system’s certificate store for Internet browsing. If your users will be using these applications, you must install the certificate into the certificate store for your OS.
|
If you are using Windows 7/8/10, double-click on the certificate file and select Open. Select Install Certificate to launch the Certificate Import Wizard.
Use the wizard to install the certificate into the Trusted Root Certificate Authorities store. If a security warning appears, select Yes to install the certificate.
|
|
If you are using Mac OS X, double-click on the certificate file to launch Keychain Access.
Locate the certificate in the Certificates list and select it. Expand Trust and select Always Trust. If necessary, enter the administrative password for your computer to make this change.
|
|
If you have the right environment, the certificate can be pushed to your users’ devices. However, if Firefox is used, the certificate must be installed on each individual device, using the instructions below.
|
Firefox (on Windows or Mac OS)
Firefox has its own certificate store. To avoid errors in Firefox, then the certificate must be installed in this store, rather than in the OS.
|
Go to Tools > Options > Advanced or Firefox > Preferences > Advanced and find the Certificates tab.
Select View Certificates, then select the Authorities list. Import the certificate and set it to be trusted for website identification.
|
|
3. Results
|
Before installing the certificate, an error message would appear in the browser when a site that used HTTPS was accessed (the example shows an error message appearing in Firefox).
|
|
After you install the certificate, you should not experience a certificate security issue when you browse to sites on which the FortiGate unit performs SSL content inspection.
If you view information about the connection, you will see that it is verified by Fortinet.
|
|
Using a self-signed certificate
In this method, a self-signed certificate is created using OpenSSL. This certificate will then be installed on the FortiGate for use with SSL inspection.
In this recipe, OpenSSL for Windows version 0.9.8h-1 is used.
1. Creating a certificate with OpenSSL
|
If necessary, download and install Open SSL. Make sure that the file openssl.cnf is located in the BIN folder for OpenSSL.
Using Command Prompt (CMD), navigate to the BIN folder (in the example, the command is cd c:\OpenSSL\openssl-0.9.8h-1-1bin\bin .
|
Generate an RSA key with the following command:
OpenSSL genrsa -aes256 -out fgcaprivkey.pem 2048 -config openssl cnf
This RSA key uses AES 256 encryption and a 2058-bit key.
When prompted, enter a pass phrase for encrypting the private key.
|
Use the following command to launch OpenSSL, submit a new certificate request, and sign the request:
openssl req - new -x509 -days 3650 -extensions v3_ca -key fgcaprivkey.pem -out fgcacert.pem - config openssl.cnf
The result is a standard x509 binary certificate that is valid for 3,650 days (approx. 10 years)
When prompted, re-enter the pass phrase for encryption, then enter the details required for the certificate request, such as location and organization name.
|
Two new files have been created: a public certificate (fgcacert.pem) and a private key (in the example, fgcaprivkey.pem).
|
2. Enabling certificate configuration in the web-based manager
|
Go to System > Feature Select. Under Additional Features, enable Certificates and Apply the changes. |
|
3. Importing the self-signed certificate
|
Go to System > Certificates and select Import > Local Certificate.
Set Type to Certificate, then select your Certificate file and Key file. Enter the Password used to create the certificate.
|
|
The certificate now appears on the Local CA Certificates list.
|
|
4. Edit the SSL inspection profile
|
To use your certificate in an SSL inspection profile go to Security Profiles > SSL/SSH Inspection. Use the dropdown menu in the top right corner to select deep-inspection, the profile used to apply full SSL inspection.
|
|
Set CA Certificate to use the new certificate.
Select Download Certificate, to download the certificate file needed in the next step.
|
|
5. Importing the certificate into the web browser
|
Internet Explorer, Chrome, and Safari (on Windows or Mac OS):
The above browsers use the operating system’s certificate store for Internet browsing. If your users will be using these applications, you must install the certificate into the certificate store for your OS.
|
If you are using Windows 7/8/10, double-click on the certificate file and select Open. Select Install Certificate to launch the Certificate Import Wizard.
Use the wizard to install the certificate into the Trusted Root Certificate Authorities store. If a security warning appears, select Yes to install the certificate.
|
|
If you are using Mac OS X, double-click on the certificate file to launch Keychain Access.
Locate the certificate in the Certificates list and select it. Expand Trust and select Always Trust. If necessary, enter the administrative password for your computer to make this change.
|
|
If you have the right environment, the certificate can be pushed to your users’ devices. However, if Firefox is used, the certificate must be installed on each individual device, using the instructions below.
|
Firefox (on Windows or Mac OS)
Firefox has its own certificate store. To avoid errors in Firefox, then the certificate must be installed in this store, rather than in the OS.
|
Go to Tools > Options > Advanced or Firefox > Preferences > Advanced and find the Certificates tab.
Select View Certificates, then select the Authorities list. Import the certificate and set it to be trusted for website identification.
|
|
6. Results
|
Before installing the certificate, an error message would appear in the browser when a site that used HTTPS was accessed (the example shows an error message appearing in Firefox).
After you install the certificate, you should not experience certificate errors when you browse to sites on which the FortiGate unit performs SSL content inspection.
|
|
If you view information about the certificate in the browser, you will see that your self-signed certificate is used.
|
|
The post Preventing certificate warnings appeared first on Fortinet Cookbook.