Description |
This article describes how to generate a certificate when FIPS is enabled on FortiGate and/or FortiAnalyzer. Note that OpenSSL is not endorsed or supported by Fortinet. Change the information on these files according to individual security policy. Fortinet is not responsible for generating and maintaining custom certificates. The certificates created here should not be used in production and are difficult to manage. This article only provides an example. |
Scope | FortiAnalyzer, FortiGate, FIPS, Linux, OpenSSL. |
Solution |
This article describes how to create a certificate with the minimum requirements outlined in this Technical Tip when FIPS mode is enabled: Technical Tip: FortiGate is not able to send logs ... - Fortinet Community.
This example will illustrate the creation of 5 files: ca-script.sh, client.conf, root-ca.conf, server.conf and sub-ca.conf. Each file contains just the minimum requirements for FIPS mode. All files must reside within the same directory.
OpenSSL must be installed on Linux OS.
ca-script.sh:
#!/bin/bash
### root CA
mkdir certs
openssl req -new -config root-ca.conf -out root-ca.csr -keyout ca.key
### sub CA
touch index.sub
openssl req -new -config sub-ca.conf -out sub-ca.csr -keyout int1.key
openssl req -new -config server.conf -out server.csr -keyout server-rsa.key
openssl req -new -config client.conf -out client.csr -keyout client-rsa.key
#cat ca.crt int1.crt > cachain.crt rm crlnumber.*
client.conf:
[ default ]
[ req ]
[ server_dn ]
[ server_reqext ]
server.conf
[ default ]
[ req ]
[ server_dn ]
[ server_reqext ] root-ca.conf
[default]
[ca_dn]
[ca_default]
[policy_c_o_match]
[req]
[ca_ext]
[sub_ca_ext] sub-ca.conf
[default]
[ca_dn]
[ca_default]
[policy_c_o_match]
[req]
[ca_ext]
[server_ext]
[client_ext]
Before running ./ca-script.sh to generate X509 certs for OFTP connection, edit the following file:
server.conf:
If the intention is to use DNS:
SAN = DNS:oftp-server.example.com
Replace 172.25.176.12 with the FortiAnalyzer's actual IP address.
Edit the permission file with the command chmod +x ca-script.sh on Linux OS.
After running ./ca-script.sh, the following X509 certs/keys are generated:
Run the following commands to import 2 CA certs into FortiAnalyzer:
edit CA-1 set ca "..." <- Copy and paste the content of ca.crt. next edit CA-2 set ca "..." <- Copy and paste the content of int1.crt. next end
Note: The content with the certificate starts with ------BEGIN CERTIFICATE------- and finishes with -----END CERTIFICATE-------.
Run the following commands to import a server certificate into FortiAnalyzer:
config system certificate local edit oftp-server set private-key "..." <- Copy and paste the content of server-rsa.key. end
Run the following commands to import 2 CA certificates into FortiGate:
edit CA-1 set ca "..." <- Copy and paste the content of ca.crt. next edit CA-2 set ca "..." <- Copy and paste the content of int1.crt. next end
If FortiAnalyzer runs in FIPS mode, upload the client certificate to the FortiGate. There are two ways to do this:
In this example, just one certificate client will be used for all devices. To generate one certificate for each device, customize this script to create just the client certificate using the CA and Sub CA existents when running the script for the first time.
This is optional: If FortiAnalyzer runs in normal mode, the following configuration is NOT necessary.
config vpn certificate local edit oftp-client set private-key "..." <- Copy and paste the content of client-rsa.key. set certificate "..." <- Copy and paste the content of client-rsa.crt. end
Related articles: |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.