| Description | This article describes how use to both custom and factory certificates to secure FortiGate to FortiManager (FGFM) protocol communications in situations where some FortiGate model's 'Fortinet Factory' does not contain the serial number in the Common Name Field (CN=) and the FortiManager already manages a large fleet of devices with the default factory certificates. |
| Scope | FortiManager, FortiGate. |
| Solution |
Starting from FortiManager v7.6.2/v7.4.6/v7.2.10, the fgfm-peercert-withoutsn command is no longer supported, and FortiManager will always check the FortiGate's certificate for the FortiGate Serial Number inside the CN Field. If this field shows a different value from the Serial Number seen on the Fortigate , the connection is rejected.
Due to this change in behavior, certain on-demand/pay-as-go FortiGate cloud instances (OCI PAYG,RAXONDEMAND,ALIOND) are no longer able to communicate with the FortiManager as the Fortinet_Factory certificate on these model's do not contain the serial number in the CN Field of the certificate. This is due to a fundamental differences in how these instances are deployed/provisioned by these cloud providers. These differences currently do not allow a signed factory default certificate (containing the serial number) to be securely retrieved from FortiCare/FortiGuard by the FortiGate instance and a generic factory certificate is used instead.
It is however possible to restore communication by making use of custom certificates: Technical Tip: Setup custom certificate for FGFM protocol.
This article will focus on a scenario where a FortiManager is already managing a large fleet of physical FortiGates and the administrator desires to continue using the default Fortinet_Factory for those devices but wishes to use custom certificates for an impacted On-Demand instance to restore management connectivity.
This can be achieved with minimal configuration changes across the fleet of devices due to the fact that the FortiManager will implicitly trust the Certificate Authority that signed the Fortinet_Factory certs even if a custom Certificate Authority for FGFM protocol communications is specified. The FGFM certificate validation is done bidirectionally:
The key detail is that the certificates sent in both directions are validated independently and thus do not need to be signed by the same Certificate Authority. This permits an Administrator to only need issuing certificates for specific devices and not the entire managed fleet.
config system central-management
Prerequisites prior to implementation:
keyUsage=critical,digitalSignature
Implementation:
Once prerequisites are met (e.g. certificates correctly issued), implementing custom certificates for impacted FortiGate on-demand/pay-as-you-go instances can be done using the following steps.
config system central-management
config system global end
Debug Commands:
diagnose fgfm ?
diagnose debug application fgfmd -1 |
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 2025 Fortinet, Inc. All Rights Reserved.