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 runexecute cfg savebefore the timeout, the device reboots and goes back to the last saved config:
config system global
set cfg-save revert
set cfg-revert-timeout 600
endOnce 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:
get system statusThen 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:
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
endIt 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:
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
endThen log out of every admin session, log in as noc-ops and delete admin:
config system admin
delete "admin"
endIt 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:
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
endIn 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
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
endStarting 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:
config system admin
edit "noc-ops"
set two-factor fortitoken
set fortitoken <serial-number>
set email-to "noc@example.com"
next
endThe 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:
config system global
set admin-forticloud-sso-login disable
endThen 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.
config system interface
edit "wan1"
unset allowaccess
next
edit "mgmt"
set allowaccess ping https ssh
next
endWatch 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
config system global
set admin-sport 8443
set admin-ssh-port 2222
set admin-telnet disable
set admin-https-redirect disable
set admintimeout 5
endadmin-sportandadmin-ssh-portchange 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 onhttps://10.10.99.1:8443.admin-telnet disableturns the telnet service off completely. Telnet sends passwords unencrypted.admin-https-redirect disablemeans HTTP is no longer redirected to HTTPS. Fortinet recommends turning it off.admintimeout 5logs out an admin after 5 idle minutes. Fortinet says keep it under 10.
9) Strong crypto for HTTPS and SSH
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
endWith 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):
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
endThen the rules. Allow from the management network first, then block the rest:
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
endA 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):
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
endWe 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:
config system interface
edit "port8"
set status down
next
endIf 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:
config system auto-install
set auto-install-config disable
set auto-install-image disable
end12) Correct time with NTP
Logs with the wrong time are useless. 2FA and certificates also depend on the right time:
config system ntp
set ntpsync enable
set type custom
config ntpserver
edit 1
set server "10.10.99.10"
next
end
endIf 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:
config log fortianalyzer setting
set status enable
set server "10.10.99.60"
set enc-algorithm high
endYou also have to authorize the device on the FortiAnalyzer side.
If you have a syslog server or a SIEM, send over TCP with TLS:
config log syslogd setting
set status enable
set server "10.10.99.50"
set mode reliable
set port 6514
set enc-algorithm high
endFor 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:
config log setting
set local-in-policy-log enable
end
config firewall local-in-policy
edit 11
set logtraffic enable
next
end14) Encrypted backups
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:
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 seeadminor any unknown account. Every admin should have atrusthost. - In
show system interface wan1, you shouldn't seeset allowaccess. diagnose sys ntp statusshould show the clock is synced.
Then from outside. From a VPS outside your network, scan the firewall's public IP (only your own device):
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:
nmap --script ssl-enum-ciphers -p 8443 10.10.99.1You 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:
execute log filter category event
execute log displayYou 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:
diagnose debug flow filter addr <test-ip>
diagnose debug enable
diagnose debug flow trace start 10You should see the packet dropped on policy 11. Don't forget diagnose debug disable afterwards.
Check automatic upgrades like this:
diagnose test application forticldd 13Practical 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.