31/10/2026

FortiGate Security Checklist for FortiOS 7.6

A lot of people think that because they bought a FortiGate, they're secure. Expensive firewall, big name, done. But the firewall itself is a device you have to secure too. If its management interface is open to the internet, or the `admin` user is still enabled with a simple password, that expensive firewall becomes the way into your whole network.

A lot of people think that because they bought a FortiGate, they're secure. Expensive firewall, big name, done. But the firewall itself is a device you have to secure too. If its management interface is open to the internet, or the admin user is still enabled with a simple password, that expensive firewall becomes the way into your whole network.

The ITcorv team works with enterprise networks, and this is the checklist we go through on every new FortiGate. It's based on Fortinet's own hardening guidance (the FortiOS Best Practices guide), and every command here is for FortiOS 7.6.

What does FortiGate security mean?

FortiGate security means the firewall itself is managed only from the right place, by the right people. The management interface isn't reachable from the WAN, every admin has their own account and 2FA, extra services are off, weak crypto is disabled, the firmware is up to date, and if something goes wrong you have logs and a backup.

This is what people call FortiGate hardening. You close every path you don't need so the attack surface gets smaller.

Why it matters more right now

In January 2026 (Bahman 1404), Fortinet disclosed CVE-2026-24858. If FortiCloud SSO login was enabled on a device, an attacker with a FortiCloud account could get into it without that device's password (when FortiCloud SSO was enabled). Fortinet says it was exploited in the wild. What the attackers did was simple: they downloaded the config file and created a new admin account with names like support or backup so they could come back later.

One interesting detail: this feature is off by default, but when you register the device from its own GUI, it gets turned on unless you switch the toggle off.

On FortiOS 7.6, the minimum version with the fix is 7.6.6. Details are in Fortinet's official advisory.

That's just one example. A FortiGate sits at the edge of the network and is always a target. That's why updating matters, and so does making sure the management interface can't be seen from outside at all.

Sample FortiGate hardening config in 14 steps

Three things before you start:

  • Connect from the console port or the management network, not over the internet. If you close the wrong thing, you lock yourself out.
  • FortiGate doesn't have a Safe Mode like MikroTik, but it has something close. With cfg-save revert, changes only apply temporarily. If you don't run execute cfg save before the timeout, the device reboots and goes back to the last saved config:
bash@itcorv:~
config system global
    set cfg-save revert
    set cfg-revert-timeout 600
end

Once you're sure everything works, run execute cfg save. At the end, set cfg-save back to automatic.

  • Take a backup first (step 14).

In the examples, the management network is 10.10.99.0/24, the management interface is mgmt, the internet interface is wan1, the log server is 10.10.99.50, the internal NTP server is 10.10.99.10 and the backup server is 10.10.99.40. Swap these for your own.

1) Update FortiOS and follow PSIRT

First, see what version you're on:

bash@itcorv:~
get system status

Then check Fortinet's security advisories at fortiguard.com/psirt. Fortinet itself says to always run the latest patch of your branch and never stay on a version that's out of support. Read the release notes before you upgrade.

If your FortiGate is standalone (not in a Fabric and not managed by FortiManager), you can turn on automatic patch upgrades:

bash@itcorv:~
config system fortiguard
    set auto-firmware-upgrade enable
    set auto-firmware-upgrade-delay 3
    set auto-firmware-upgrade-start-hour 2
    set auto-firmware-upgrade-end-hour 4
end

It only upgrades within the same branch, for example 7.6.x to 7.6.y. It won't jump to 8.0 on its own. delay 3 means it installs a new patch three days after it shows up, between 2 and 4 a.m.

A note for Iran: automatic upgrades and the FortiGuard databases (IPS, antivirus and the rest) depend on the device reaching FortiGuard servers and having a valid license. If your device can't reach FortiGuard, this part won't work and you have to keep an eye on versions by hand. Only get firmware from the official source, not from whatever link is going around in chat groups.

2) Retire the default admin user

Everyone knows the name admin. Fortinet recommends changing the default admin name and ports. First create a new admin:

bash@itcorv:~
config system admin
    edit "noc-ops"
        set accprofile "super_admin"
        set password "a-long-strong-password"
        set trusthost1 10.10.99.0 255.255.255.0
    next
end

Then log out of every admin session, log in as noc-ops and delete admin:

bash@itcorv:~
config system admin
    delete "admin"
end

It won't delete while admin is logged in.

The rule is simple: everyone gets their own account. No shared accounts, because you can't tell who did what, and you can't rotate the password properly. For people who only need to view things or manage one area, create a limited profile under System > Admin Profiles and assign it to them.

3) Set trusthosts on every admin

trusthost says this admin can only log in from these IPs or subnets. You can set up to 10:

bash@itcorv:~
config system admin
    edit "noc-ops"
        set trusthost1 10.10.99.0 255.255.255.0
        set trusthost2 10.20.0.0 255.255.255.0
    next
end

In the example, 10.20.0.0/24 is the admins' VPN range. One detail from Fortinet's docs: when every admin has trusthosts, administrative access on all interfaces is restricted to those IPs (except ping). If one admin is left without trusthosts, the restriction isn't complete. So don't skip anyone.

4) Strong passwords and lockout after failed logins

bash@itcorv:~
config system password-policy
    set status enable
    set apply-to admin-password
    set minimum-length 14
    set min-upper-case-letter 1
    set min-lower-case-letter 1
    set min-number 1
    set min-non-alphanumeric 1
    set reuse-password disable
end

config system global
    set admin-lockout-threshold 3
    set admin-lockout-duration 900
end

Starting with FortiOS 7.6.5, the password policy is on by default and requires at least 12 characters. But if you upgraded from an older version, check it anyway.

The second part locks the admin out for 900 seconds (15 minutes) after 3 wrong passwords. The default is 60 seconds, which is short for slowing down password guessing.

One more thing: from 7.6.1, admin passwords are stored with PBKDF2. But if you upgraded from an older version, each admin's password stays on the old hash until that admin logs in once or the password is changed. So after upgrading, reset the passwords of admins who don't log in.

5) 2FA for admins with FortiToken

A password alone isn't enough. Fortinet recommends MFA for admins:

bash@itcorv:~
config system admin
    edit "noc-ops"
        set two-factor fortitoken
        set fortitoken <serial-number>
        set email-to "noc@example.com"
    next
end

The fortitoken option doesn't show up until you set two-factor to fortitoken. If you don't have FortiToken, email and SMS are options too. If you have FortiAuthenticator, you can centralize 2FA there.

Important: before turning on 2FA, have a second admin (a break-glass account with a very strong password that you keep somewhere safe). If a token gets lost or the device clock drifts, you're not locked out.

6) Turn off FortiCloud SSO if you don't need it

The same feature we mentioned above. If your admins don't log in with FortiCloud, it's better off:

bash@itcorv:~
config system global
    set admin-forticloud-sso-login disable
end

Then run show system admin and look into any account you don't recognize.

7) Close management on the WAN (allowaccess)

Every interface has an allowaccess setting that says which management services answer on it. Fortinet says plainly not to use the WAN for management, because it's under constant attack.

bash@itcorv:~
config system interface
    edit "wan1"
        unset allowaccess
    next
    edit "mgmt"
        set allowaccess ping https ssh
    next
end

Watch out: set allowaccess replaces the whole list, it doesn't add to it. If you only want to add one thing, use append allowaccess.

If you have FortiManager, put fgfm only on the interface FortiManager connects through. Don't put http or telnet anywhere.

8) Management ports, telnet and timeout

bash@itcorv:~
config system global
    set admin-sport 8443
    set admin-ssh-port 2222
    set admin-telnet disable
    set admin-https-redirect disable
    set admintimeout 5
end
  • admin-sport and admin-ssh-port change the HTTPS and SSH management ports. Fortinet recommends this, but it only cuts down lazy scanners. The real work is steps 7 and 10. After this command your GUI session drops and you have to come back on https://10.10.99.1:8443.
  • admin-telnet disable turns the telnet service off completely. Telnet sends passwords unencrypted.
  • admin-https-redirect disable means HTTP is no longer redirected to HTTPS. Fortinet recommends turning it off.
  • admintimeout 5 logs out an admin after 5 idle minutes. Fortinet says keep it under 10.

9) Strong crypto for HTTPS and SSH

bash@itcorv:~
config system global
    set strong-crypto enable
    set admin-https-ssl-versions tlsv1-2 tlsv1-3
    set ssl-static-key-ciphers disable
    set dh-params 8192
end

With strong-crypto on, HTTPS management only accepts TLS 1.2 and 1.3, and weak SSH algorithms are disabled. ssl-static-key-ciphers disable turns off the ciphers that don't have forward secrecy. These are the same settings as in Fortinet's Best Practices guide.

If you have an old tool that connects to the firewall over SSH, test it once after this step.

10) Local-in policies for management access

allowaccess says which services are open on an interface. A local-in policy is another layer that says more precisely from where and to where. It's like the input firewall on a MikroTik: traffic whose destination is the FortiGate itself.

First create the address and services (since we changed the ports in step 8, the default HTTPS and SSH services won't match):

bash@itcorv:~
config firewall address
    edit "MGMT-NET"
        set subnet 10.10.99.0 255.255.255.0
    next
end

config firewall service custom
    edit "ADMIN-HTTPS"
        set tcp-portrange 8443
    next
    edit "ADMIN-SSH"
        set tcp-portrange 2222
    next
end

Then the rules. Allow from the management network first, then block the rest:

bash@itcorv:~
config firewall local-in-policy
    edit 10
        set intf "mgmt"
        set srcaddr "MGMT-NET"
        set dstaddr "all"
        set action accept
        set service "ADMIN-HTTPS" "ADMIN-SSH" "PING"
        set schedule "always"
    next
    edit 11
        set intf "any"
        set srcaddr "all"
        set dstaddr "all"
        set action deny
        set service "ADMIN-HTTPS" "ADMIN-SSH"
        set schedule "always"
    next
end

A few notes:

  • Unlike regular firewall policies, local-in policies have no implicit deny at the end. If you don't add the deny rule yourself, the rest of the traffic is allowed too. That's why rule 11 is needed.
  • We only put the deny on the management services. If you deny ALL, you might also block VPN, dynamic routing or HA. Fortinet warns about this too, so write these carefully.
  • On FortiOS 7.6, a device that comes up from factory defaults has a default local-in policy that blocks known malicious IPs and Tor nodes using the Internet Service Database. If your device already had a config and was upgraded, it may not have this rule. Add it by hand (supported from 7.4.4):
bash@itcorv:~
config firewall local-in-policy
    edit 1
        set intf "any"
        set dstaddr "all"
        set internet-service-src enable
        set internet-service-src-name "Malicious-Malicious.Server" "Tor-Exit.Node" "Tor-Relay.Node"
        set service "ALL"
        set schedule "always"
    next
end

We didn't set an action because the default is deny.

11) Unused ports and USB

Shut down every port that has no cable or isn't part of the network design:

bash@itcorv:~
config system interface
    edit "port8"
        set status down
    next
end

If the device isn't in a physically secure place, make sure automatic firmware and config install from USB is off. It's off by default, but check once:

bash@itcorv:~
config system auto-install
    set auto-install-config disable
    set auto-install-image disable
end

12) Correct time with NTP

Logs with the wrong time are useless. 2FA and certificates also depend on the right time:

bash@itcorv:~
config system ntp
    set ntpsync enable
    set type custom
    config ntpserver
        edit 1
            set server "10.10.99.10"
        next
    end
end

If you're worried about international internet going down, use your own internal NTP server, not an external one.

13) Ship logs off the box (FortiAnalyzer or syslog)

Logs that only live on the firewall are useless once someone else controls the device. If you have FortiAnalyzer:

bash@itcorv:~
config log fortianalyzer setting
    set status enable
    set server "10.10.99.60"
    set enc-algorithm high
end

You also have to authorize the device on the FortiAnalyzer side.

If you have a syslog server or a SIEM, send over TCP with TLS:

bash@itcorv:~
config log syslogd setting
    set status enable
    set server "10.10.99.50"
    set mode reliable
    set port 6514
    set enc-algorithm high
end

For TLS, the syslog server needs a certificate and the FortiGate has to trust its CA. If that's not ready yet, test first without enc-algorithm and with mode udp, then move to TLS.

Also turn on local-in logging so you can see failed attempts to reach the management interface:

bash@itcorv:~
config log setting
    set local-in-policy-log enable
end

config firewall local-in-policy
    edit 11
        set logtraffic enable
    next
end

14) Encrypted backups

bash@itcorv:~
execute backup config sftp fgt-core.conf 10.10.99.40 backup-user "sftp-password" "backup-password"

The last parameter encrypts the backup. A FortiGate config file has everything, from the network layout to sensitive data. So:

  • Always encrypt the backup.
  • Keep it somewhere safe and delete old backups you don't need.
  • If you have to share the config with someone, give them only the part they need, not the whole file.

Testing FortiGate security after the config

First on the firewall itself:

bash@itcorv:~
get system status
show system admin
show system interface wan1
show firewall local-in-policy
diagnose sys ntp status
  • In get system status, the version should be the one you wanted.
  • In show system admin, you shouldn't see admin or any unknown account. Every admin should have a trusthost.
  • In show system interface wan1, you shouldn't see set allowaccess.
  • diagnose sys ntp status should show the clock is synced.

Then from outside. From a VPS outside your network, scan the firewall's public IP (only your own device):

bash@itcorv:~
nmap -Pn -p 22,23,80,443,2222,8443 <WAN-IP>

None of them should be open. If one is, go back to steps 7 and 10.

Then test TLS from a machine on the management network:

bash@itcorv:~
nmap --script ssl-enum-ciphers -p 8443 10.10.99.1

You should only see TLSv1.2 and TLSv1.3 in the output. If you see TLSv1.0 or TLSv1.1, step 9 didn't apply properly.

Test the lockout too. From a machine on the management network, enter the wrong password 3 times with a test admin, then look at the event log on the firewall:

bash@itcorv:~
execute log filter category event
execute log display

You should see the failed logins and the lockout. The same logs should also arrive at FortiAnalyzer or your syslog server.

If you're not sure the local-in policy is working, use debug flow to see where traffic is dropped:

bash@itcorv:~
diagnose debug flow filter addr <test-ip>
diagnose debug enable
diagnose debug flow trace start 10

You should see the packet dropped on policy 11. Don't forget diagnose debug disable afterwards.

Check automatic upgrades like this:

bash@itcorv:~
diagnose test application forticldd 13

Practical FortiGate security tips

  • Don't put the management interface on the internet, use a VPN. Fortinet says management is best done from a separate network or over a VPN, and out-of-band if possible. For remote access, put the admins' VPN range in the trusthosts and the local-in policy.
  • Changing ports isn't security. It only cuts down scan noise in the logs. The real work is closing it from the WAN.
  • If you still use SSL VPN, watch out: starting with FortiOS 7.6.3, SSL VPN tunnel mode is removed completely and its settings aren't carried over during the upgrade. Migrate to IPsec VPN before you upgrade. IPsec with IKEv2 can also run over TCP port 443.
  • Don't forget IPv6. If IPv6 is on, add the same local-in rules under local-in-policy6.
  • Think before enabling private-data-encryption. It strengthens the encryption of stored passwords, but from 7.6.1 the device generates the key itself. That means a backup taken in this mode won't simply restore on another device. Sort out RMA and replacement units before you turn it on.
  • Review the admin list every so often. When someone leaves, delete their account.
  • One change at a time. Change one thing, test, then move on.
  • If you run web services behind the FortiGate, a network firewall doesn't replace a WAF. Take a look at our WAF with nginx and ModSecurity post.
  • If you also have MikroTiks on the network, see the MikroTik security checklist. The logic is very similar.

FAQ

Isn't a FortiGate secure on its own?

The device itself is fine; the problem is usually the config and not updating. Most bad things happen when the management interface is open to the internet or the firmware is stuck on an old version. If you stay updated and work through this checklist, you're in much better shape.

Should I use trusthosts or a local-in policy?

Both. Trusthosts say, per admin, where they can log in from. A local-in policy stops packets from reaching the management service at the network level, and it gives you logs. Two layers are better than one.

Should I turn on automatic firmware upgrades?

For a standalone FortiGate, Fortinet recommends it. It only installs patches within the same branch and waits a few days with delay. If the device is under FortiManager or in a Fabric, this option can't be enabled and upgrades have to be managed from there.

What if I delete admin and forget the new admin's password?

Starting with FortiOS 7.2.4, the maintainer account that used to reset passwords from the console was removed. So always keep a second break-glass admin with a strong password stored somewhere safe, and make sure you have console access to the device.

---

If you want us to go through this checklist on your network's FortiGates, see our network security services. The ITcorv team also offers a free 30-minute review.

Related posts