Skip to content
Guides & References

FortiOS management access

Worked examples for the FortiOS management access template: a 10 minute admin timeout, no insecure admin protocols, strong crypto and a pre-login banner.

Policy LibraryUpdated
Platform
fortinet-fortios
Minimum version
rConfig 8.3.0
Editions
Pro, Vector, Enterprise
On this page

FortiOS management access

Rules for how admins reach the firewall: idle sessions closed, only secure protocols, strong ciphers, and a warning before login. They come from the fortios-management-access policy template.

Every example on this page was checked with rConfig Pro's policy engine on

Each of the 8 configs below was run through rConfig Pro’s evaluator with the rule above it, and gave the result shown. The configs are sanitised excerpts of the sample configs that come with the template. A card marked changed has one line edited to show a failure.

All the rules come from fortios-management-access.policy in the policy templates (v1.5.0). Import the whole file with Import Templates (see importing a policy template), or copy one rule into your own definition. The Fortinet FortiOS templates page lists the file’s known limitations. Run the rules against show full-configuration.

Rule Method Since
Admin idle timeout evaluate_block 8.3.0
No insecure admin protocols must_not_match_regex 8.0.2
Strong crypto evaluate_block 8.3.0
Pre-login banner evaluate_block 8.3.0

Admin idle timeout

An admin session left open is an open door. This rule checks config system global for the exact line set admintimeout 10. Any other value fails, longer or shorter.

Definition
// The admin idle timeout is 10 minutes (set admintimeout 10)
#[evaluate_block]
scope: ^config system global$
all:
- equals: set admintimeout 10
passPassing config: Hardened FortiGate 60F sample (FortiOS 7.4.4, synthetic)
config system global
set admintimeout 10
set hostname "branch-fw01"
set pre-login-banner enable
set strong-crypto enable
end

Why: The timeout is 10 minutes.

failFailing config: FortiGate 100F sample (FortiOS 7.4.4, synthetic)
config system global
set admintimeout 15
set hostname "office-fw01"
set strong-crypto enable
end

Why: The timeout is 15 minutes, not 10.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AC-2
HIPAA (45 CFR) 164.312(a)(1)
ISO/IEC 27001:2022 Annex A A.8.5

Tested with: sample excerpts from FortiOS 7.4.4 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


No insecure admin protocols

set allowaccess lists the ways an admin can reach an interface. Telnet, HTTP, rsh and rexec send logins in clear text. This rule fails if any interface allows one of them.

Definition
// No interface allowaccess line permits telnet, http, rsh or rexec
#[must_not_match_regex]
/^\s*set\s+allowaccess\s+.*\b(telnet|http|rsh|rexec)\b.*$/m
passPassing config: Hardened FortiGate 60F sample (FortiOS 7.4.4, synthetic)
config system interface
edit "mgmt"
set vdom "root"
set ip 192.0.2.6 255.255.255.0
set allowaccess ping https ssh snmp
set type physical
next
edit "internal1"
set vdom "root"
set ip 198.51.100.1 255.255.255.192
set allowaccess ping https ssh
next
end

Why: Only ping, HTTPS, SSH and SNMP are allowed.

failFailing config: Hardened FortiGate 60F sample (FortiOS 7.4.4, synthetic), changed: http added to the mgmt allowaccess line
config system interface
edit "mgmt"
set vdom "root"
set ip 192.0.2.6 255.255.255.0
set allowaccess ping https http ssh snmp
set type physical
next
edit "internal1"
set vdom "root"
set ip 198.51.100.1 255.255.255.192
set allowaccess ping https ssh
next
end

Why: The mgmt interface allows plain HTTP.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 CM-7
HIPAA (45 CFR) 164.312(c)(1)
ISO/IEC 27001:2022 Annex A A.8.5

Tested with: sample excerpts from FortiOS 7.4.4 (synthetic). Minimum rConfig 8.0.2 (must_not_match_regex). Editions: Pro, Vector, Enterprise.


Strong crypto

set strong-crypto enable turns off weak ciphers and old TLS versions for admin access. This rule checks config system global for that exact line.

Definition
// Strong crypto is enabled (set strong-crypto enable)
#[evaluate_block]
scope: ^config system global$
all:
- equals: set strong-crypto enable
passPassing config: Hardened FortiGate 60F sample (FortiOS 7.4.4, synthetic)
config system global
set admintimeout 10
set hostname "branch-fw01"
set pre-login-banner enable
set strong-crypto enable
end

Why: Strong crypto is on.

failFailing config: Hardened FortiGate 60F sample (FortiOS 7.4.4, synthetic), changed: strong-crypto disable
config system global
set admintimeout 10
set hostname "branch-fw01"
set pre-login-banner enable
set strong-crypto disable
end

Why: Strong crypto is turned off.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
NIST SP 800-53 AC-17
NIST CSF 1.1 PR.AC-1
HIPAA (45 CFR) 164.312(a)(1)
ISO/IEC 27001:2022 Annex A A.8.24

Tested with: sample excerpts from FortiOS 7.4.4 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


Pre-login banner

The pre-login banner is shown before an admin logs in. It tells people the device is private and that use is monitored. This rule checks for set pre-login-banner enable.

Definition
// The pre-login banner is enabled (set pre-login-banner enable)
#[evaluate_block]
scope: ^config system global$
all:
- equals: set pre-login-banner enable
passPassing config: Hardened FortiGate 60F sample (FortiOS 7.4.4, synthetic)
config system global
set admintimeout 10
set hostname "branch-fw01"
set pre-login-banner enable
set strong-crypto enable
end

Why: The pre-login banner is on.

failFailing config: FortiGate 100F sample (FortiOS 7.4.4, synthetic)
config system global
set admintimeout 15
set hostname "office-fw01"
set strong-crypto enable
end

Why: There is no set pre-login-banner enable line, so the banner is off.

Expected result in rConfig, with this rule as the only rule in a definition:

ConfigRule resultOverall result
Passing configpassPASS
Failing configfailFAIL

Framework mapping. The rule provides evidence towards these controls. It does not certify anything.

Framework Reference
ISO/IEC 27001:2022 Annex A A.8.5

Tested with: sample excerpts from FortiOS 7.4.4 (synthetic). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.


Type to search.