Technical Tip: How to register a FortiGate to a FortiManager from the CLI
| Description | This article describes how to register a FortiGate to FortiManager from the CLI. |
| Scope | FortiGate, FortiManager. |
| Solution | Start by setting up the configuration on the FortiGate with the following commands:
config system central-management
The FortiGate will then be visible in the FortiManager in the Root ADOM under the Unauthorized Devices:
It is now possible to authorize the unit on the FortiManager.
Starting from version 6.0, FortiManager will use the default admin/<blank password> to contact the FortiGate by default. Therefore, if the FortiGate admin password is not blank, FortiManager will be unable to authorize the device, and authorization will fail.
Also, an error might be seen in the FortiGate CLI as below :
(central-management) $ end
These 2 possibilities to work around this issue:
execute batch start end
config system central-management set serial-number "FMG_SN" end
Once one of the workarounds has been applied, it will be possible to authorize the FortiGate from the FortiManager GUI.
Alternatively, it is possible to configure the FortiManager to automatically accept registration requests from the FortiGate.
On the FortiManager:
config system admin setting end
On the FortiGate:
config system central-management
execute central-mgmt register-device <- FortiManager serial number, password on the FortiManager.
Note: If the FortiManager is connected to the FortiGate over the IPsec tunnel source IP address needs to be configured under FortiGate central-management.
config system central-management
The FortiGate will then be automatically registered on the FortiManager. If ADOM is enabled, it will be added to the root ADOM.
diagnose fdsm central-mgmt-status
From FortiManager v7.6.3, a new control feature has been introduced. It will disable new VMs from registering to FortiManager. By default, registration of new FortiGate-VMs is disabled (refer to Security enhancement to control new VM device registration to FortiManager | FortiManager 7.6.0 New ...).
To allow VMs to be managed by FortiManager, run the following configuration:
config system global set fgfm-allow-vm enable end
Related articles: |



