FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
Article Id 192593



This article describes how the 'FGFM' protocol is used for communication between FortiGate and FortiManager devices and how to troubleshoot issues with the protocol.

The FGFM protocol runs over SSL (Secure Sockets Layer) using TCP port 541 under IPv4.




FortiGate and FortiManager.



Check if 'FMG-Access' is enabled under the FortiGate management port.

Go to Network -> Interfaces -> Double-click the management port -> Administrative access and check 'FMG-Access' is enabled.


Failing that, check the SSL compatibility.

On FortiManager.


config sys global
    set fgfm-ssl-protocol
    sslv3                           <- Set SSLv3 as the lowest version.
    tlsv1.0                         <- Set TLSv1.0 as the lowest version.
    tlsv1.1                         <- Set TLSv1.1 as the lowest version.
    tlsv1.2                         <- Set TLSv1.2 as the lowest version (default).

On FortiGate.


config system global

show full

set ssl-min-protocol-version 


SSLv3 SSLv3.
TLSv1 TLSv1.
TLSv1-1 TLSv1.1.
TLSv1-2 TLSv1.2.
TLSv1-3 TLSv1.3.


The TLS versions should match on both FortiGate and FortiManager.



set enc-algorithm
default     <- High strength algorithms and these medium-strength 128-bit key length algorithms: RC4-SHA, RC4-MD5, RC4-MD.
high           <- 128-bit and larger key length algorithms: DHE-RSA-AES256-SHA, AES256-SHA, EDH-RSA-DES-CBC3-SHA, DES-CBC3-SHA, DES-CBC3-MD5, DHE-RSA-AES128-SHA, AES128-SHA.
low            <- 64-bit or 56-bit key length algorithms without export restrictions: EDH-RSA-DES-CDBC-SHA, DES-CBC-SHA, DES-CBC-MD5.


The enc-algorithm can be the same on both or can be higher on FortiGate.

It can be verified on FortiManager with these commands:


get sys global

    show full


It can be verified on FortiGate with these commands:


config sys global

    show full



The 'FGFM' protocol implements a secure communication protocol with the following functions:

FortiGate reachability status (from FortiManager).
FortiManager reachability status (from FortiGate).
Configuration installation and retrieval.
Script push.
JSON monitoring via RTM.


The following communications between FortiGate and FortiManager units are handled outside of the 'FGFM' protocol and are managed by the FortiGuard protocol:


  • FortiGuard package downloads (AV, IPS, Virus Scan, etc).
  • FortiGuard query (WF, AS).
  • Firmware Downloads.


The 'FGFM' protocol runs over SSL (Secure Sockets Layer) using TCP port 541 under IPv4. FortiManager 6.2 supports the use of IPv6.

Both FortiGate and FortiManager units have an 'FGFM' daemon running exclusively for FortiGate to FortiManager communication.
The FortiManager unit listens on TCP port 541 for an incoming session request. The FortiGate unit establishes an SSL session with the FortiManager.
Both units use TCP port 541 for sending and receiving messages.

The 'FGFM' daemon handles all FortiGate to FortiManager (and vice versa) authentication, keep-alive messages, and actions resulting from them (such as instructing another daemon on a FortiGate device to update its configuration or various database files).


The 'diagnose fdsm central-mgmt-status' command provides connectivity and registration status of the FortiGate with the FortiManager.


diagnose fdsm central-mgmt-status


Telnet to the FortiManager IP on port 541 to ensure reachability.


execute telnet <FMG-IP> 541


Ensure proper MTU size end to end from FortiGate to FortiManager.


exe ping-options df-bit yes


exe ping-options data-size <1472>


exe ping-options source <fgt ip used in fmg-source-ip in central mgmt>


exe ping <fmg IP>


It is possible to confirm the MTU size from FortiGate to FortiManager by executing the following commands on the FortiGate CLI:


exe ping-option df-bit yes -> do not fragment ICMP packet.
exe ping-option data-size 1500 -> ICMP will add 8 bytes for the ICMP header.
exe ping x.x.x.x -> where x.x.x.x is FMG-IP.


If there was packet loss, change the data size to 1470/1400/ 1350/ 1320/ 1312 and verify on which data size value there was no packet loss.


Then adjust if needed:

Technical Note : How to adjust the Maximum Transmission Unit (MTU) value on a FortiGate interface


The source IP of the FortiGate can also be configured to use the respective IP of the FortiGate, which is reachable with the FortiManager. This is useful for cases such as VPN access.


config system central-management
    set fmg-source-ip <FGT-IP>


If FortiGate is losing the FGFM tunnel, it may be linked to FortiManager being behind a NAT and sending the wrong IP to FortiGate. To solve this, configure the management address setting on a FortiManager that is behind a NAT device so the FortiGate can initiate a connection to the FortiManager. Configuring the management address setting in the CLI ensures FortiManager knows the public IP and can configure it on the FortiGate.


config systems admin setting

    set mgmt-fqdn <IP> <FQDN> 



Note, use mgmt-fqdn even if only IP addresses are used and no FQDNs.



Debug on FortiGate.


diag debug reset
diag debug application fgfm 255
diag debug console time enable
diag debug en


Debug on FortiManager.


diag debug reset
diag debug application fgfmsd 255 <deviceName>
diag debug time enable
diag debug en


To generate the output in the debugs, re-initiate the connection from the FortiGate (or) from the FortiManager:


  1. Re-initiate the connection from the FortiGate CLI by restarting the 'FGFM' daemon.


fnsysctl killall fgfmd


  1. Claim the tunnel from FortiManager CLI using the below syntax.


exe fgfm reclaim-dev-tunnel <device_name>
    devicename                                <- Optional device name.


Sample FortiGate output to check the registration status:


diagnose fdsm central-mgmt-status
Connection status: Up
Registration status: Registered


Sniffer Packets:


If it is possible to ping FortiGate from FortiManager and if FortiGate is not communicating with FortiManager, it is possible to capture the packets with the commands below.


Run sniffer on FortiGate using Putty with SSH connection and all session output logging:


diag sniff pack any "port 541 and host x.x.x.x" 6 0 a <- Where x.x.x.x is the FortiManager IP address.


At the same time, run a sniffer on FortiManager with the following syntax:


diag sniff pack any "port 541 and host y.y.y.y" 3 0 a <- Where y.y.y.y is the FortiGate IP address.


Related articles: