Skip to main content
montyadams
Staff
Staff
March 27, 2026

Technical Tip: Securing the FortiGate administrative interface against brute-force attacks

  • March 27, 2026
  • 0 replies
  • 776 views
Description

This article describes methods to reduce brute-force attempts against the FortiGate administrative interface.

A brute-force attempt against an administrator account is commonly identified by repetitive administrator login failure events in the event logs, assuming that Event Log and Administrator Events are enabled.

 

In many environments, these login attempts are generated by automated tools running from compromised hosts on the Internet. These tools scan for reachable HTTPS and SSH services, then attempt known credentials, weak passwords, or known attack patterns.

Scope FortiGate, FortiOS v7.2.x, v7.4.x, v7.6.x.
Solution

The most effective protection is to restrict administrative access so that only known source IP addresses can reach the administrative services.

 

One method is to configure trusted hosts on each administrator account.

Go to System -> Administrators, edit the required administrator account, then configure the trusted hosts that are allowed to connect to the FortiGate. A single host or an entire subnet can be defined.

 

admin-usr.jpg

 

If one administrator account does not have trusted hosts configured, FortiGate still allows administrative access on the enabled management services from any source IP address. In that case, the trusted host restriction applies only to the administrator accounts that have trusted hosts configured.

Another method is to use a local-in policy to restrict administrative access from the WAN interface without fully disabling HTTPS or SSH administrative access.

This approach is useful when administrative access must remain enabled on a WAN-facing interface, but access must be limited to a defined list of source addresses.


In FortiOS v7.6.0 and later v7.6.x releases, local-in policies can be configured from the GUI.

In FortiOS v7.2.x and v7.4.x, local-in policies must be configured from the CLI.

Create address objects for the approved management IP addresses or subnets, then place them in an address group. Create a custom service object if a custom HTTPS port or a custom SSH port is used. After that, apply the local-in policy.

 

 
config firewall local-in-policy
edit 0
set intf "port1"
set srcaddr "Admin-In"
set srcaddr-negate enable
set dstaddr "all"
set service "Admin-allowed"
set schedule "always"
set logtraffic enable
next
end
 
linpoli.jpg

 

This example denies access from all source addresses that are not part of the allowed address object or address group referenced by 'Admin-In', while still keeping administrative access enabled on the interface.

A further hardening measure is to use the Internet Service Database in a local-in policy to block traffic from known malicious sources, such as botnet infrastructure, phishing hosts, anonymous VPN providers, proxy services, Tor nodes, and bulletproof hosting providers.

 
config firewall local-in-policy
edit 0
set intf "port1"
set dstaddr "all"
set internet-service-src enable
set internet-service-src-name "Botnet-C&C.Server" "Phishing-Phishing.Server"
"Malicious-Malicious.Server" "Spam-Spamming.Server" "VPN-Anonymous.VPN" "Proxy-Proxy.Server"
"Tor-Tor.Node" "Tor-Exit.Node" "Tor-Relay.Node" "Hosting-Bulletproof.Hosting"

set service "ALL"
set schedule "always"
set logtraffic enable
next
end
 
linpoli2.jpg

 

This method does not replace trusted hosts or explicit local-in restrictions for administrative access. It adds another layer of protection by reducing exposure to known hostile networks.

 

For additional hardening, limit administrative access only to the required protocols, use non-default administrative ports where operationally appropriate, and ensure that strong administrator passwords and multi-factor authentication are enabled where supported.

Note:

The command 'diagnose alertconsole list' is helpful in identifying login failures; the command also displays the source IP where the attempt originated.

Related articles:
Technical Tip: Hardening best practices: Secure network and devices

Technical Tip: How to delete or rename the default 'admin' user

Technical Tip: Use local-in policy to restrict unauthorized login attempts to administrative access ... 

Technical Tip: System administrator best practices 

Technical Tip: Recommendations and common scenarios for Administrator access on FortiGate

Technical Tip: Block FortiGate Administrator Login with an automation stitch in the event of 3 conse...

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.