Skip to main content

Security best practices for FortiGate

Last update:

Recommendations for improving your security level.

The settings in this guide are valid for FortiOS 6.x and 7.x versions. If you have a different version of FortiOS, you can find documentation for it in the FortiGate control panel in the top-right corner or on the official FortiGate website.

Use secure access protocols

Disable HTTP or Telnet for administrative access to FortiGate. We recommend leaving only HTTPS and SSH access enabled.

You can change these settings for individual interfaces on the NetworkInterfaces tab.

Enable redirect to HTTPS

Redirect all HTTP connection attempts to HTTPS.

  1. Go to SystemSettingsAdministrator Settings
  2. Enable Redirect to HTTPS.

Change default access ports

Change the default ports for administrative HTTPS and SSH access to non-standard ones. Before changing, ensure that the ports are not being used for other services.

  1. Go to SystemSettingsAdministrator Settings
  2. Change the HTTPS and SSH ports.

Configure short login timeouts

Set the idle time to a short duration to prevent unauthorized access when the administrator is absent.

  1. Go to SystemSettings.
  2. In the Idle timeout field, specify the idle time in minutes. The recommended time is five minutes.
  3. Click Apply.

Configure login for trusted addresses

Allow login only from trusted addresses.

  1. Go to SystemAdministrators.
  2. Edit the account, enable Restrict login to trusted hosts.
  3. Add trusted addresses or networks.

Create multiple administrator accounts

For security purposes, it is recommended to have a separate account for each administrator. Create multiple administrator accounts.

Configure account lockout

To protect against password brute-forcing, configure account lockout after entering an incorrect password. By default, the number of failed password attempts is three.

Rename the administrator account

Rename the administrator account. This makes it more difficult for an attacker to log in to FortiOS.

Disable unused interfaces

  1. Go to NetworkInterfaces.
  2. Edit the interface and set the Interface Status parameter to Disabled.

Disable unused protocols

You can disable unused protocols that attackers may use for information gathering. Many of these protocols are disabled by default.

To change via CLI, enter:

config system interface
edit <interface_name>
set dhcp-relay-service disable
set pptp-client disable
set arpforward disable
set broadcast-forward disable
set l2forward disable
set icmp-redirect disable
set vlanforward disable
set stpforward disable
set ident-accept disable
set ipmac disable
set netbios-forward disable
set security-mode none
set device-identification disable
set lldp-transmission disable
end