Skip to content
Export guide · Firewalls and network

How to export your Fortinet FortiGate configuration, and what we check in it

Where you run it: FortiGate CLI over SSH or the console, or the GUI, signed in as an administrator with the super_admin profile.

In short

Fortinet FortiGate configuration export: the file Fortinet FortiGate writes of its own settings, which a configuration review reads setting by setting without connecting to Fortinet FortiGate.

How to export the Fortinet FortiGate configuration, step by step, what the review checks in the file (55 checks run), and what it does not read.

The filePlain text, one .conf file in FortiOS command-line interface (CLI) syntax. Our reader needs its top line to start with #config-version=
Checks run on it55
Highest grade its findings reachPROVEN
Feeds attack pathsYes
Not read from this export2 areas, listed below

Sources: Fortinet FortiGate documentation (1); Fortinet FortiGate documentation (2); Fortinet FortiGate documentation (3); the vendor table.

How to export it

Who can pull it
An administrator with the super_admin profile, or a profile with System set to Read/Write
Time
About 5 minutes per FortiGate; a large configuration takes a minute or two more to print.
The file
Plain text, one .conf file in FortiOS command-line interface (CLI) syntax. Our reader needs its top line to start with #config-version=

In the Fortinet FortiGate console

  1. GUI (FortiOS 7.x): click your user name (in the upper right-hand corner) → Configuration → Backup → Backup to: Local PC → File format: FortiOS (not YAML) → leave Encryption and Password mask off → OK, and upload the .conf (on FortiOS 8.0.1 and later this screen has no unprotected choice: use the command-line steps there)

    The vendor's page, checked 2026-11-11

Or from the command line

  1. macOS or Linux: log the SSH session to a file with ssh <user>@<fortigate-ip> | tee fortigate.conf(<user> is your super_admin account)

    The vendor's page, checked 2026-10-15
  2. Windows (PuTTY): Session → Logging → "Printable output" → choose the log file, then open the SSH session

    The vendor's page, checked 2026-10-15
  3. config system console

    The vendor's page, checked 2026-11-11
  4. set output standard(turns off the --More-- paging that cuts the output)

    The vendor's page, checked 2026-11-11
  5. end

    The vendor's page, checked 2026-11-11
  6. show full-configuration(wait for the prompt to come back and keep the session open: the step after this one puts the paging back with set output more and says how to trim the log file before you upload it)

    The vendor's page, checked 2026-11-11
  7. After the configuration has printed, put the paging back: config system consolethen set output morethen endThen close the session and open the log file. Our reader needs the top line of the file to be the one that starts with #config-version= , so delete every line above it. Also delete every line after the configuration (the prompt lines and the three commands you just typed). Save the file and upload it.

    The vendor's page, checked 2026-11-11

What the file looks like

Plain text, one .conf file in FortiOS command-line interface (CLI) syntax. Our reader needs its top line to start with #config-version=. It varies with the firewall: the file grows with its policies, objects, VPNs and VDOMs, and show full-configuration also prints every setting left at its default. The upload takes files up to 10 MB.

What it holds: Every table: firewall policies, address and service objects, VIPs, VPNs, admin accounts, interfaces, logging and feature settings. full-configuration also prints defaults, so settings left at their default are visible.

Fortinet says "Read access is required to view configurations", so an account without read access to an area does not get that area in the output; the super_admin profile has "access to all components of FortiOS". With virtual domains (VDOMs) enabled, Fortinet’s examples enter a global setting after config global and leave it with one more end; a multi-VDOM file is not read yet, and the upload lists the sections it skipped. set output standard is saved on the FortiGate (its default is more): the last command-line step puts it back. About the GUI backup: Fortinet’s backup pages for 7.0.17, 7.2.11, 7.4.13, 7.6.8 and 8.0.0 show the screen the GUI step describes (FortiOS 7.0 has no File format field). From 7.2.1 it also has Password mask, which replaces passwords and secrets with FortinetPasswordMask; Fortinet’s steps for it choose the YAML format, which the review does not read, so leave it off. From FortiOS 8.0.1 the screen has Security option instead, with no choice that leaves the file unprotected, and a file made there has not been tried with the review yet.

Afterwards

Put the paging back with the commands Fortinet gives under "To enable pausing the CLI output": config system console, then set output more, then end (the last command-line step does this). After the upload, delete the session log or the .conf file from your computer. The GUI backup leaves no setting to put back.

If the export goes wrong

What you seeThe fix
The upload says the file is an encrypted / binary-encoded backupBack up again in the GUI with Encryption off and File format FortiOS (not YAML), and upload the new .conf. On FortiOS 8.0.1 and later the backup screen has no such choice: use the command-line steps there.
The upload does not recognise the file: it starts with SSH banner or prompt lines, or it stops at a --More-- lineRun config system console, set output standard and end before show full-configuration. Then open the log file, delete every line above the one that starts with #config-version= and every line after the configuration, save it and upload it again.
Just part of the configuration was exported (whole sections such as config firewall policy are missing)Sign in with an account that has the super_admin profile (see who can pull it, above) and export again.
The FortiGate has virtual domains (VDOMs) enabled and does not accept config system console at the promptWith VDOMs enabled, Fortinet’s examples enter a global setting after config global and leave it with one more end: type config global, then config system console, set output standard and end, then end once more, and run show full-configuration after that. This is Fortinet’s general pattern for global settings; its pages do not say it of the console setting. A multi-VDOM file is not read yet: the upload lists the sections it skipped.
The upload does not go through: it shows HTTP 422, or a message with too_big and "at most 10485760 character(s)", because the file is larger than 10 MBshow full-configuration also prints every setting left at its default. Back up in the GUI instead (your user name → Configuration → Backup → Local PC, File format FortiOS, Encryption off) and upload that .conf: Fortinet describes its full-config backup, and no other backup, as including the default settings, so this backup leaves them out and is smaller. The review then reads the settings that were changed from their default; a setting left at its default is not in that file.

What we read from it

Checks run
55
Formats read
show full-configuration text export
Releases
6.4.0 to 7.6.x

Checks run is the number of checks that reached a result on this system's own export in our tests, as the vendor table shows it.

The areas checked

  • Firewall policies: any-any accepts, logging, and the security profiles each accept policy applies (web filter, application control, IPS, antivirus, SSL inspection)
  • Admin accounts: two-factor, trusted hosts, lockout, idle timeout, the default admin and how many hold super_admin
  • Management access on WAN interfaces (HTTPS, SSH, SNMP) and interface roles
  • Crypto and VPN settings: strong-crypto, admin TLS version, SSH version, IPsec Diffie-Hellman groups and IKE version
  • SSL-VPN: RADIUS/MFA, source restriction and login limits
  • VIPs and central NAT
  • Password policy, syslog, NTP, FortiGuard updates and HA mode
  • SNMP communities

The grade its findings reach

Proven A finding from this file can reach PROVEN: the stored file is read a second time by a separate reader, and the finding is found at the setting it names.

Its findings feed attack paths: each one can be a step on a path an attacker could take to your crown jewels.

Attack paths, the one change and dollar figures are MODELED. How each grade is worked out is on the method page.

What we do not read from this export

  • Multi-VDOM files: settings inside config global and config vdom blocks are not read yet
  • Rule comments, so rule documentation is not checked
  • Hit counts, so unused rules are not found
  • Logs, sessions and traffic: this is the configuration and nothing else

Limits of the reader

  • Multi-VDOM exports are read as partial: the settings inside config global and each VDOM are not read, and the review says so.
  • The checks of this system are not counted: a check counts once a test shows it firing on a file in the layout the vendor documents.

A finding never comes from what the file does not hold: live traffic, running hosts and logs are not in a configuration export.

A Fortinet FortiGate finding from the sample company

Sample company: Acme Capital (fictional)

Policy 47 allows any internal-corp traffic to prod-payments

HighProvenHQ FortiGate · firewall policy › edit 47 · L1288

Run the sample to see this finding with its fix and the paths it sits on.

Questions

Who can export the Fortinet FortiGate configuration?

Fortinet names two things. Its backup page (FortiOS 7.4.9, 7.6.6, 8.0.0 and 8.0.2): "Administrators can back up a configuration file when using an admin profile with access permissions for System set to Read/Write"; a profile with System set to Read cannot. Its administrator profiles page (7.4.0 and 7.6.6): "For certain administrative functions, such as backing up and restoring the configuration, super_admin access is required." The command-line steps also need write access, because set output standard is a configuration change ("Write access is required to make configuration changes"), and read access to every area, because "Read access is required to view configurations". The super_admin profile covers all of this.

Does the export change anything?

The command-line steps save set output standard in the FortiGate configuration (Fortinet lists its default as more) until the last step puts it back. The GUI backup saves a file to your computer and edits no setting; Fortinet’s log reference lists the event it writes: "System configuration backed up".

Does the file hold passwords or keys?

Fortinet: "The passwords, and private keys used in certificates, that are stored on the FortiGate are encrypted using a predefined private key". They show as ENC values, and Fortinet advisory FG-IR-19-007 says to consider them "easy to decrypt" if the file gets out. Administrator passwords are stored as hashes. With private-data-encryption on (it is off by default) the FortiGate uses its own key. With redaction on (the default), the passwords, keys and tokens the review recognises are replaced with a placeholder before anything is stored; the check before upload shows how many it found.