FortiManager and FortiAnalyzer hold the keys to every FortiGate they manage and the logs that would show misuse, so a weakly protected manager turns one appliance into a fleet-wide foothold. Hardening the firewalls alone does not cover this: the manager pushes policy, scripts and firmware to devices over the FortiGate-to-FortiManager (FGFM) protocol, and the analyser stores the evidence your SOC relies on. This guide covers the customer-side controls for both products: FGFM exposure, administrator and API access, encryption settings, change control, log integrity and monitoring. It is written for network security engineers, firewall administrators and the SOC teams who depend on Fortinet logs, and it assumes the firewall itself is already hardened as described in the FortiGate Hardening Guide.
This is an independent guide from NHI Mgmt Group, based on Fortinet's public documentation as of November 2026. It is not sponsored or reviewed by Fortinet. Product features change, so confirm settings against Fortinet's current documentation.
Key takeaways
- Treat TCP/541 as a privileged channel. FGFM is how FortiManager controls devices; keep it off the internet where you can, and where you cannot, turn on
fgfm-deny-unknownand a custom FGFM certificate. - Every administrator needs a trusted host. One account without trusted hosts reopens administrative access on every interface where it is allowed, so the control only works when applied to all accounts.
- API administrators are non-human identities. REST API admins with tokens should get a narrow admin profile, read-only
rpc-permitwhere possible, trusted hosts and an owner, never a shared Super_User key. - Change control belongs in the tool. Workflow mode makes Device Manager and Policy & Objects read-only until a session is approved, which turns policy pushes into reviewable events.
- Logs are only evidence if they are protected. Send FortiGate logs over reliable, encrypted OFTP, turn on log checksums, block unregistered log devices and forward the managers' own event logs off-box.
Why the manager is a different risk from the firewall
A FortiGate controls traffic through one site. FortiManager holds the configuration, policy packages, scripts and firmware images for many FortiGates and can install changes to all of them, which makes it a software deployment tool in the ATT&CK sense (T1072 Software Deployment Tools). FortiAnalyzer receives logs from those devices and from FortiManager itself, so control of it lets an intruder read reconnaissance data or remove evidence.
The exposure points are specific and few, which makes them manageable:
- FGFM listener: FortiGates connect to FortiManager on TCP/541 (IPv4) and TCP/542 (IPv6). This is the device management channel, and it is often exposed to the internet so that branch and remote FortiGates can reach a central manager.
- Administrative interfaces: GUI and JSON API on TCP/443 (and TCP/80 if allowed), SSH on TCP/22, the web service API on TCP/8080 and SNMP on UDP/161.
- Log intake on FortiAnalyzer: OFTP and syslog on TCP and UDP 514, plus management traffic from FortiManager on TCP/541.
- Local FortiGuard service: when FortiManager acts as a local FortiGuard distribution server it listens on extra ports such as TCP/8888, TCP/8890 and TCP/8900 for updates and rating queries.
- Credentials held: administrator accounts, REST API tokens, device credentials and the certificates used for FGFM and OFTP.
Public-facing management services are a recurring initial access route (T1190 Exploit Public-Facing Application, T1133 External Remote Services), and stolen administrator or API credentials map to T1078 Valid Accounts. The Edge Device Security Guide covers this risk class across vendors; the rest of this page is the Fortinet manager and analyser specifics.
Reduce FGFM and network exposure
Fortinet's FortiManager 7.6 hardening guidance gives a clear order of preference: reach FortiManager through a VPN between FortiGates so FGFM uses internal addresses, and if TCP/541 must be exposed publicly, enable the deny-unknown setting. Work through the options below from the strongest down.
| Deployment pattern | What it looks like | Controls to apply | When it fits |
|---|---|---|---|
| Private management only | FortiManager and FortiAnalyzer on a management VLAN, no public address, FortiGates reach them over site-to-site VPN | Firewall the management VLAN, allow 541/514 only from device tunnel ranges, admin access only from a jump host subnet | Default choice for most estates, including small ones with a few sites |
| Public FGFM, private admin | TCP/541 published so remote FortiGates can register; GUI, SSH and API stay internal | fgfm-deny-unknown enable, custom FGFM CA with fgfm-cert-exclusive enable, source restrictions on the upstream firewall where branch IPs are known | Large or dispersed estates where VPN-first onboarding is impractical |
| Zero-touch provisioning with pre-shared keys | New FortiGates register without prior entry in Device Manager | Time-box the window, then enable fgfm-deny-unknown, which blocks pre-shared key ZTP; review the Unauthorized Devices list | Rollout projects only, not steady state |
| Cloud-hosted VM | FortiManager or FortiAnalyzer VM in a public cloud | Security groups limited to device and admin ranges, no public GUI, cloud audit logging on the instance and its disks | Organisations already running management workloads in the cloud |
FGFM settings that matter
- Deny unknown devices: under
config system global,set fgfm-deny-unknown enablemakes FortiManager accept FGFM connections only from devices already in Device Manager. Fortinet notes it does not remove devices already in the Unauthorized Devices list, so clear that list as a separate step. - Serial number check: by default FortiManager requires the FortiGate certificate to contain the device serial number, and Fortinet recommends leaving this on. The option to turn it off,
fgfm-peercert-withoutsn, is no longer available from FortiManager 7.6.2, where the check always applies. On older versions, if it has been turned off, Fortinet's guidance is that FortiManager should not be reachable from the internet. - Exclusive custom certificate:
set fgfm-ca-certwithset fgfm-cert-exclusive enablemeans only FortiGates holding a certificate from your CA can connect. Plan certificate distribution before enabling it, because devices without the certificate are refused. - Protocol version:
set fgfm-ssl-protocol tlsv1.2(or the version your policy requires) for the FGFM tunnel. - NAT: where FortiManager sits behind NAT, configure its dedicated public IP so tunnels establish correctly rather than opening broader rules to make them work.
Close what you do not use
- Interfaces: disable unused interfaces and remove HTTP, SNMP, SSH or web service access from interfaces that do not need them (
allowaccessper interface). - Local FortiGuard service: if FortiManager serves updates, set
unreg-dev-option ignoreunderconfig fmupdate fds-settingso unregistered devices cannot pull updates or rating queries, and setfds-ssl-protocolto TLS 1.2 or later. - Upstream filtering: place both appliances behind a firewall; Fortinet suggests a FortiGate with antivirus and IPS profiles applied to the management traffic.
Administrator access and API identities
FortiManager and FortiAnalyzer share the same administrator model: local or remote (RADIUS, LDAP, TACACS+, SAML) accounts, each with an admin profile and access to one or more administrative domains (ADOMs). There is no password recovery mechanism from version 5.4.0, so credential custody and a tested break-glass account are part of hardening, not an afterthought.
Human administrators
- Named accounts: one account per person for traceability; disable or rename shared defaults once named accounts exist.
- MFA: require multi-factor authentication for every administrator. Fortinet's guidance references FortiAuthenticator; remote authentication through your identity provider achieves the same aim.
- Trusted hosts: set them on every account. Fortinet's documentation is explicit that if all administrators have trusted hosts the unit does not respond to administrative access from elsewhere, but if even one administrator is unrestricted, access attempts are accepted on any interface with administrative access enabled. Use a single management subnet or a /32 per jump host.
- Lockout and timeouts:
admin-lockout-thresholdandadmin-lockout-durationunderconfig system global(Fortinet's example is 2 attempts and 120 seconds), plus a short idle timeout. - Password policy: minimum length, character classes and expiry for local accounts, aligned with your wider policy.
- Least privilege by ADOM and profile: give operations staff profiles restricted to their ADOMs and read-only where they only need visibility; keep Super_User for a small, named group.
REST API administrators
From FortiManager 7.2.2, API administrators can authenticate with a token. Fortinet documents creating them under System Settings > Admin > Administrators > Create New > REST API Admin, or with config system admin user, set user_type api, a profileid, an rpc-permit level and trusthost1 to trusthost10. The key is generated with execute api-user generate-key <name> and presented as a bearer token or an access_token URL parameter.
| Setting | Hardened choice | Why |
|---|---|---|
profileid | A custom profile scoped to the ADOMs and features the automation uses | Fortinet's own example uses Super_User with all ADOMs, which suits a lab, not production |
rpc-permit | read for reporting and inventory tools; read-write only for change automation | Most integrations (CMDB sync, compliance checks) only read |
trusthost1 to trusthost10 | The automation server's address as a /32 | A stolen token then only works from that host |
ipv6_trusthost1 | Set explicitly; the example default is ::/0 | An open IPv6 trusted host undoes the IPv4 restriction where IPv6 is reachable |
| Token transport | Authorization: Bearer header | Keeps the key out of URLs, proxy logs and browser history |
| Storage and rotation | Secrets manager, regenerate on a schedule and on staff or vendor change | The key is a long-lived credential with no human to notice misuse |
Treat each API admin as a non-human identity with an owner, purpose and review date. See the Secrets Management Guide for storage patterns.
Encryption and transport settings
Both products expose the same global cipher and protocol controls. Fortinet's 7.6 hardening pages give this baseline:
Setting (config system global unless noted) | Hardened value | Protects |
|---|---|---|
enc-algorithm | high (the documented default; medium and low widen ciphers) | All TLS services |
ssl-protocol | tlsv1.2 or later per policy | GUI and API |
ssl-low-encryption | disable | Removes weak ciphers |
fgfm-ssl-protocol | tlsv1.2 or later | FGFM device tunnel |
oftp-ssl-protocol | tlsv1.2 or later | Log transfer from devices |
fds-ssl-protocol (config fmupdate fds-setting) | tlsv1.2 or later | Local FortiGuard service |
Before tightening, check the oldest FortiOS version in the managed estate supports the protocol you set, or those devices will drop off management. Replace the factory certificate on the GUI with one from your internal CA so administrators can detect interception.
Change control with workspace and workflow modes
A manager that can push policy to every firewall needs the same change discipline as a production deployment pipeline. FortiManager provides this natively:
- Workspace mode: administrators must lock an ADOM or policy package before editing, which prevents concurrent edits and records who held the lock.
- Workflow mode:
set workspace-mode workflow(all ADOMs) orset workspace-mode per-adomthen enable per ADOM in the GUI. In workflow mode Device Manager and Policy & Objects are read-only until an administrator starts a workflow session, and sessions go to approval groups with email notification. Changing the mode ends your login session, so schedule it. - Install previews: require reviewers to read the install preview, not only the policy diff, because the preview shows the CLI that will reach the device.
- Script governance: CLI scripts run against many devices at once; restrict who can create and run them, and review them like code.
The approach maps to configuration management practice in NIST CSF 2.0 PR.PS-01 and fits the review cadence in the Firewall Management Guide.
Log integrity and FortiAnalyzer intake
FortiAnalyzer is often the only long-term record of what happened on the firewalls. Protect what arrives and what is stored:
- Encrypt log transport. By default, Fortinet documents that OFTP control traffic uses TCP/514 with TLS while log traffic uses UDP/514 unencrypted. On each FortiGate,
set reliable enableunderconfig log fortianalyzer settingsends logs over TCP with TLS. Fortinet cautions that this reduces logging performance, so size FortiAnalyzer for it. - Turn on checksums.
set log-checksum md5-auth(ormd5) underconfig system globalrecords a hash for each log file when it rolls or is sent; the default isnone. Verify withexecute log-integrity. - Refuse unknown senders.
set detect-unregistered-log-device disablestops FortiAnalyzer (or FortiManager with analyser features) accepting logs from devices it does not know, which blocks log flooding and spoofed records. - Forward off-box. Send FortiAnalyzer and FortiManager event logs, especially administrator logins, configuration changes and API calls, to a separate SIEM or log store that the Fortinet administrators cannot alter. See the Log Management and Retention Guide for retention periods.
- Keep time consistent. Configure NTP on both appliances (
config system ntp) so device, manager and SIEM timestamps line up during an investigation.
Where identity fits
Most of the fleet-wide risk in this guide is an identity problem: who can log in, from where, with what profile, and which machine credentials (API tokens, FGFM certificates, device credentials) can act without a human present. Inventory every administrator and API admin on both appliances, link each to an owner and a remote identity source where possible, and review them on the same cycle as other privileged accounts. The Privileged Access Management Guide covers the review model.
Implementation plan
- Inventory (week 1): list both appliances' versions, interfaces with
allowaccess, public exposure of TCP/541, 542, 443, 22 and 514, all administrator and API accounts, and currentfgfm-*andlog-checksumsettings. - Apply security updates: bring FortiManager and FortiAnalyzer to a supported release using Fortinet's upgrade path, and subscribe to the FortiGuard PSIRT advisories so future updates are applied promptly.
- Restrict administrative access: trusted hosts on every account, MFA, lockout, idle timeout; test from a non-trusted host that the GUI and SSH do not respond.
- Constrain FGFM: move devices to VPN-based management where possible; otherwise enable
fgfm-deny-unknown, clear the Unauthorized Devices list and plan the custom certificate rollout in a pilot ring of a few FortiGates first. - Tighten crypto: apply the TLS settings in a maintenance window after confirming every managed FortiOS version supports them. Roll back by restoring the previous value if devices lose connection.
- Re-scope API admins: create least-privilege profiles, regenerate keys, move them into a secrets manager, then delete the old accounts.
- Enable workflow: start per ADOM with one team, then extend to all ADOMs.
- Protect logs: reliable OFTP on a pilot group of FortiGates, watch FortiAnalyzer load, then roll out; enable checksums and off-box forwarding.
- Back up: take configuration backups of both appliances before and after the changes and store them encrypted outside the appliances.
Small vs large estates: a small organisation with one FortiManager and a handful of sites can usually reach the private-management pattern in a day and skip workflow approvals in favour of a second-person review. Large or managed-service estates should prioritise custom FGFM certificates, ADOM separation per customer or region, and workflow mode, because one compromised administrator touches more devices.
Detection and measurement
Watch for these events in FortiManager and FortiAnalyzer event logs, forwarded to your SIEM:
- Administrator activity: logins from outside the jump host range, failed login bursts (T1110 Brute Force), new administrators or API admins, profile changes, and key generation.
- Device registration: new entries in the Unauthorized Devices list or unexpected device additions to Device Manager.
- Fleet changes: policy installs and script runs outside approved workflow sessions or change windows.
- Logging gaps: devices that stop sending logs, sudden drops in log volume, or changes to log settings on FortiGates.
- Appliance behaviour: unexpected outbound connections from the management appliances or unfamiliar files, handled with the Edge Device Compromise Investigation Playbook.
| Metric | Target |
|---|---|
| Management ports (541, 542, 443, 22) reachable from the internet, per external scan | Zero for admin ports; 541 only where justified and deny-unknown is on |
| Administrator and API accounts with trusted hosts set | 100% |
| Human administrators with MFA | 100% |
| Days from Fortinet PSIRT advisory to update on both appliances | Within your critical patch SLA |
| FortiGates sending logs over reliable, encrypted OFTP | 100% of in-scope devices |
| Policy installs made through an approved workflow session | 100% outside emergencies |
Common failure patterns
- One account without trusted hosts: a legacy or vendor account left unrestricted reopens the GUI and SSH on every interface where access is allowed.
- FGFM published for onboarding and never closed: TCP/541 left open with deny-unknown off after a rollout project, accepting connections from any device.
- Super_User API keys in scripts: integration tokens with full read-write rights across all ADOMs, stored in code repositories or URLs.
- Logs only on the appliance: FortiAnalyzer as the sole copy of firewall and manager logs, so whoever controls it controls the evidence.
- TLS tightened without a version check: older FortiOS devices drop off management after a protocol change, and the change is reverted wholesale rather than fixed.
- Unaudited CLI scripts: scripts that change many devices at once run by anyone with policy rights, with no review.
Framework mapping
| Control area | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | ISO/IEC 27001:2022 Annex A |
|---|---|---|---|
| Administrator accounts, MFA, lockout | AC-2, IA-2, AC-7 | PR.AA-01 | A.5.15, A.8.5 |
| Least privilege profiles and ADOMs | AC-6 | PR.AA-05 | A.8.2 |
| FGFM and admin exposure, trusted hosts | AC-17, CM-7 | PR.PS-01 | A.8.20 |
| TLS for FGFM, OFTP and GUI | SC-8 | PR.DS-02 | A.8.24 |
| Updates | SI-2 | PR.PS-02 | A.8.8 |
| Log integrity and review | AU-9, AU-6 | PR.PS-04, DE.CM-01 | A.8.15, A.8.16 |
| Configuration backups | CP-9 | PR.DS-11 | A.8.13 |
Practitioner checklist
- Confirm TCP/541, 542, 443 and 22 exposure from outside, and remove any public administrative access.
- Enable
fgfm-deny-unknownwherever FGFM is reachable from untrusted networks, and clear the Unauthorized Devices list. - Set trusted hosts, including IPv6, on every administrator and API admin account.
- Require MFA for all human administrators and configure lockout and idle timeout.
- Replace Super_User API keys with scoped profiles, read-only
rpc-permitwhere possible, and keys held in a secrets manager. - Apply the
enc-algorithm highand TLS 1.2 or later settings after checking managed FortiOS versions. - Turn on workflow mode for production ADOMs and restrict CLI script rights.
- Enable reliable OFTP on FortiGates,
log-checksumon FortiAnalyzer and block unregistered log devices. - Forward manager and analyser event logs to a separate SIEM and alert on admin and device registration changes.
- Apply Fortinet security updates promptly and keep encrypted configuration backups off the appliances.
Standards and references
- Fortinet: FortiManager 7.6.0 Best Practices, Security hardening
- Fortinet: FortiAnalyzer 7.6.0 Best Practices, Security hardening
- Fortinet: FortiManager incoming ports
- Fortinet: FortiAnalyzer incoming ports
- Fortinet: FortiManager authentication tokens for API administrators
- Fortinet: FortiAnalyzer Log Integrity and Secure Log Transfer
- Fortinet: FortiManager Enable workflow mode
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: FortiGate Hardening Guide · Edge Device Security Guide · Firewall Management Guide · Log Management and Retention Guide · Secrets Management Guide