Skip to content

Fortinet FortiOS stock definitions

Stock definitions for Fortinet FortiGate, from the fortinet/ folder. They check the FortiOS configuration as returned by show full-configuration: config, edit, set, next and end blocks with indented set lines. This page documents release v1.2.0. See importing a stock template to load one into rConfig.

fortios-management-access.policy · 4 rules · minimum rConfig 8.3.0 · Synthetic tested

A 10-minute admin idle timeout, no insecure protocols in interface allowaccess, strong crypto and the pre-login banner.

RuleMethodWhat it checks
The admin idle timeout is 10 minutes (set admintimeout 10)evaluate_blockThe config system global section contains exactly set admintimeout 10. Other values, including 100, fail.
No interface allowaccess line permits telnet, http, rsh or rexecmust_not_match_regexNo set allowaccess line includes telnet, http, rsh or rexec. https is allowed.
Strong crypto is enabled (set strong-crypto enable)evaluate_blockThe config system global section contains set strong-crypto enable. set strong-crypto disable, or the line in another section, fails.
The pre-login banner is enabled (set pre-login-banner enable)evaluate_blockThe config system global section contains set pre-login-banner enable. set post-login-banner enable on its own does not count.

Published references recorded in the sidecar. A rule provides evidence towards a control; it does not make a device compliant with it.

RuleNIST SP 800-53HIPAA (45 CFR)NIST CSF 1.1
The admin idle timeout is 10 minutes (set admintimeout 10)AC-2164.312(a)(1)None
No interface allowaccess line permits telnet, http, rsh or rexecCM-7164.312(c)(1)None
Strong crypto is enabled (set strong-crypto enable)AC-17164.312(a)(1)PR.AC-1
  • equals: compares the whole trimmed line, so set admintimeout 10 does not match set admintimeout 100.
  • The rules use only settings documented under config system global in the FortiOS 7.4.4 CLI Reference. Release v1.2.0 removed the rules that checked set admin-https, set admin-http, set motd and set admin-addrgrp, which are not documented there.

fortios-aaa.policy · 2 rules · minimum rConfig 8.3.0 · Synthetic tested

A RADIUS server with an address, and an enabled password policy with a minimum length of 12.

RuleMethodWhat it checks
A RADIUS server entry sets a server address (config user radius)evaluate_blockThe config user radius section has at least one set server line with a non-empty address.
The password policy is enabled with a minimum length of 12 (set min-length 12 or set minimum-length 12)evaluate_blockThe config system password-policy section contains set status enable and either set min-length 12 or set minimum-length 12.

Published references recorded in the sidecar. A rule provides evidence towards a control; it does not make a device compliant with it.

RuleNIST SP 800-53
The password policy is enabled with a minimum length of 12 (set min-length 12 or set minimum-length 12)IA-5
  • A scoped rule fails when no config section matches its scope, so a config with no config user radius section fails the RADIUS rule.
  • The password rule accepts set min-length 12 (older FortiOS) or set minimum-length 12 (FortiOS 7).

fortios-snmp.policy · 2 rules · minimum rConfig 8.3.0 · Synthetic tested

No SNMPv1 or SNMPv2c communities, and SHA authentication with AES privacy for every SNMPv3 user.

RuleMethodWhat it checks
No SNMPv1 or SNMPv2c community is configured (config system snmp community is absent)must_not_match_regexThe config has no config system snmp community section.
Every SNMPv3 user uses SHA authentication and AES privacyevaluate_blockIn the config system snmp user section, every set auth-proto line uses a SHA variant and every set priv-proto line uses an AES variant, and at least one of each is present.

Published references recorded in the sidecar. A rule provides evidence towards a control; it does not make a device compliant with it.

RuleNIST SP 800-53HIPAA (45 CFR)
No SNMPv1 or SNMPv2c community is configured (config system snmp community is absent)SC-12164.312(e)(1)
Every SNMPv3 user uses SHA authentication and AES privacySC-12164.312(e)(1)
  • The SNMPv3 rule checks the whole config system snmp user section, so one user with a non-SHA auth-proto or a non-AES priv-proto fails it.

fortios-logging.policy · 2 rules · minimum rConfig 8.3.0 · Synthetic tested

Remote syslog enabled with a server on UDP port 514, and a syslog filter severity of information or notice.

RuleMethodWhat it checks
Remote syslog is enabled with a server on UDP port 514 (config log syslogd setting)evaluate_blockThe config log syslogd setting section contains set status enable, a non-empty set server, set port 514 and set mode udp.
The syslog filter severity is information or notice (config log syslogd filter)evaluate_blockThe config log syslogd filter section contains set severity information or set severity notice.

Published references recorded in the sidecar. A rule provides evidence towards a control; it does not make a device compliant with it.

RuleNIST SP 800-53HIPAA (45 CFR)NIST CSF 1.1
Remote syslog is enabled with a server on UDP port 514 (config log syslogd setting)AU-2, AU-12164.312(b)DE.CM-1
The syslog filter severity is information or notice (config log syslogd filter)AU-2, AU-12164.312(b)None
  • The severity rule accepts information or notice, because both values were used by the earlier framework files and both cannot pass on one config.

fortios-operational-standards.policy · 7 rules · minimum rConfig 8.3.0 · Synthetic tested

Checks drift from your own operational standard, not a hardening baseline: standard NTP, syslog (syslogd and syslogd2) and DNS servers, a pre-login banner, a description on every interface that is not set to status down, a hostname naming pattern and an SNMP location. Replace the example values (RFC 5737 addresses such as 192.0.2.10, and the hostname pattern) with your own before use.

RuleMethodWhat it checks
NTP servers are set to your standard (replace 192.0.2.10 and 192.0.2.11)evaluate_blockThe config system ntp section contains set ntpsync enable, set type custom, set server "192.0.2.10" and set server "192.0.2.11".
Syslog servers are set to your standard (replace 192.0.2.20 in syslogd and 192.0.2.21 in syslogd2)evaluate_blockThe config log syslogd setting section contains set status enable and set server "192.0.2.20", and the config log syslogd2 setting section contains set status enable and set server "192.0.2.21".
DNS servers are set to your standard (replace 192.0.2.30 and 192.0.2.31)evaluate_blockThe config system dns section contains set primary 192.0.2.30 and set secondary 192.0.2.31.
A pre-login banner is enabled (set pre-login-banner enable; nothing to replace)evaluate_blockThe config system global section contains set pre-login-banner enable.
Every interface that is not set to status down has a description (nothing to replace)evaluate_blockIn config system interface, every edit entry has set status down or a non-empty set description.
The hostname follows your naming pattern (replace the example pattern [a-z]{3}-fw[0-9]{2}, for example dub-fw01)evaluate_blockThe config system global section has a set hostname line whose quoted value matches the pattern exactly.
An SNMP location is set (set location in config system snmp sysinfo, any text; nothing to replace)evaluate_blockThe config system snmp sysinfo section has a set location line with a non-empty value.
  • The NTP, syslog and DNS rules check that each standard server is configured, not that no other server is.
  • The syslog rule is a regular expression: escape the dots when you replace an address, for example 192\.0\.2\.20. The NTP and DNS rules compare whole lines, so type those addresses as they are.
  • The interface rule expects FortiOS’s four-space indentation and counts set description, not set alias. An empty set description "" does not count.

fortios-build-template.policy · 10 rules · minimum rConfig 8.0.0 · Synthetic tested

Starting template for a new FortiGate build, not a compliance check: hostname, timezone, admin access, LAN interface, DHCP, DNS, NAT and firewall policies, NTP and logging. Replace the example values (for example set hostname MyFortinet and 192.168.88.0/24) with your own before use.

Every rule uses example values, so the rules fail against the samples until they are edited.

RuleMethodWhat it checks
Description: must_match_all_from_array Set Hostnamemust_match_all_from_arrayThe lines config system global, set hostname MyFortinet and end each appear somewhere in the config.
Description: must_match_all_from_array Set Timezonemust_match_all_from_arrayThe lines config system global, set timezone 32 and end each appear somewhere in the config.
Description: must_match_all_from_array Secure Access Settingsmust_match_all_from_arrayEach listed line appears somewhere in the config: config system global, set admin-scp enable, set admin-https-redirect disable, config system interface, edit "mgmt" and set allowaccess ping https ssh.
Description: must_match_all_from_array Configure LAN Interfacemust_match_all_from_arrayEach listed line appears somewhere in the config: config system interface, edit "lan", set ip 192.168.88.1/24 and set allowaccess ping https ssh.
Description: must_match_all_from_array DHCP Server Setupmust_match_all_from_arrayEach line of DHCP server edit 1 appears somewhere in the config: gateway, netmask, interface lan and the .10 to .254 range.
Description: must_match_all_from_array DNS Setupmust_match_all_from_arrayThe lines config system dns, set primary 8.8.8.8, set secondary 8.8.4.4 and end each appear in the config.
Description: must_match_all_from_array Enable NATmust_match_all_from_arrayEach line of firewall policy edit 1 (LAN to wan1, accept, all services, set nat enable) appears somewhere in the config.
Description: must_match_all_from_array Basic Firewall Rulesmust_match_all_from_arrayEach line of firewall policies edit 2 (LAN to wan1, accept) and edit 3 (wan1 to LAN, deny) appears somewhere in the config.
Description: must_match_all_from_array Enable NTP Clientmust_match_all_from_arrayThe config system ntp lines set server1, set server2, set syncinterval 60 and set status enable each appear in the config.
Description: must_match_all_from_array Set Up Loggingmust_match_all_from_arrayEach listed line appears in the config: disk, memory and syslog logging enabled, set fwpolicy-implicit-log enable and set server 192.168.88.2.

Each line of a must_match_all_from_array body is checked on its own, as text anywhere in the config. The method does not check order or which section a line sits in.