Technical Tip: Configuring certificate based IPSec tunnels with certificates issued by FortiAuthenticator
| Description | This article describes how to configure an IPSec VPN tunnel, using a certificate issued by FortiAuthenticator acting as an External CA with Certificate Revocation checking enabled (via OCSP) |
| Scope | IPSec tunnels require certificate-based authentication with revocation checking. |
| Solution | To use certificates for IPSec authentication a FortiGate device requires the following:
Certificates can be manually requested by generating a CSR from the FortiGate which is then signed by the FortiAuthenticator, however using SCEP automates this process.
Certificate enrollment using SCEP can be done directly on a Fortigate device: Technical Tip: FortiGate Certificate enrollment using SCEP
Certificate enrollment using SCEP can be managed via FortiManager:
2. The FortiAuthenticator CA certificate.
The exported certificate can then be imported to the FortiGate device as a CA certificate (System -> Certificates -> Create/Import -> CA Certificate -> Type: File).
config vpn certificate ca MIIEFzCCAv+gAwIBAgIIXHL2M/nzy+cwDQYJKoZIhvcNAQELBQAwYDELMAkGA1UE h00DnkhFZuHp2SwKIEH8FbQ77d2iWEJM8qxpFEP31BB+MsfrgkCHCkcbA== -----END CERTIFICATE-----"
FortiAuthenticator GUI -> Network -> Interfaces -> Select the desired Interface -> Enable OCSP on the interface (port 2560).
Example Configuration:
Note: Appropriate firewall policies and routing must be configured in addition to the above.
This example uses OCSP, which sends on-demand requests to the OCSP server (FortiAuthenticator) to confirm a certificate's validity.
config vpn certificate ocsp-server
config user peer
config vpn certificate setting
Notes: Any attempt to connect to a peer that has a revoked certificate should fail, with an 'IPsec phase 1 error' entered into the VPN event log, with reason = 'invalid certificate'.
Running a debug should also confirm this:
diagnose debug application fnbamd -1 diagnose debug enable
Example output, showing the certificate status:
fnbamd_verify_ocsp_response-Cert status: REVOKED, reason=4(superseded)
Related documents: Cookbook: FortiAuthenticator as a certificate authority |

