A company wants to ensure that administrative access to FortiGate is only allowed from the internal trusted network (192.168.1.0/24) and that all other access attempts are blocked. Which CLI command should the administrator configure first?
Trap 1: config system interface; edit port1; set allowaccess ping https…
This command configures the administrative protocols (ping, HTTPS, SSH) allowed on the physical interface port1. It does not limit which source IP addresses can initiate administrative sessions; any host that can reach port1's network can attempt an admin login. It is an interface-level service control, not a source-based access restriction. Without a 'trusthost' entry, an admin can log in from any reachable IP, so this does not achieve the stated 192.168.1.0/24 restriction.
Trap 2: config system global; set admin-http-redirect enable; end
Enabling 'admin-http-redirect' under 'config system global' only forces HTTP requests to the admin interface to be redirected to HTTPS for secure communication. It does not filter or restrict where administrative connections can originate. The setting merely changes the protocol behavior during login and has no effect on source IP validation, so it cannot ensure that only 192.168.1.0/24 users can access the FortiGate's admin functions.
Trap 3: set admin-sport 443
Executing 'set admin-sport 443' (presumably in 'config system global') changes the TCP port used for HTTPS administrative access from the default to 443 (or reasserts it). This modifies only the listening port — it does not inspect or restrict the source IP of incoming admin connections. As a result, it has no capability to limit administrative access to the 192.168.1.0/24 subnet, and the option is solely a port configuration, not a security policy.
- A
config system admin; edit admin; set trusthost 192.168.1.0 255.255.255.0; end
The 'trusthost' command under 'config system admin' defines an allowed source IP or subnet for administrative logins to that specific admin account. By setting '192.168.1.0 255.255.255.0', only clients originating from the 192.168.1.0/24 network can authenticate as 'admin' — all other source IPs are rejected at the management daemon level, regardless of credentials. This is the only provided option that actually restricts administrative access to a specific source address range.
- B
config system interface; edit port1; set allowaccess ping https ssh; end
Why wrong: This command configures the administrative protocols (ping, HTTPS, SSH) allowed on the physical interface port1. It does not limit which source IP addresses can initiate administrative sessions; any host that can reach port1's network can attempt an admin login. It is an interface-level service control, not a source-based access restriction. Without a 'trusthost' entry, an admin can log in from any reachable IP, so this does not achieve the stated 192.168.1.0/24 restriction.
- C
config system global; set admin-http-redirect enable; end
Why wrong: Enabling 'admin-http-redirect' under 'config system global' only forces HTTP requests to the admin interface to be redirected to HTTPS for secure communication. It does not filter or restrict where administrative connections can originate. The setting merely changes the protocol behavior during login and has no effect on source IP validation, so it cannot ensure that only 192.168.1.0/24 users can access the FortiGate's admin functions.
- D
set admin-sport 443
Why wrong: Executing 'set admin-sport 443' (presumably in 'config system global') changes the TCP port used for HTTPS administrative access from the default to 443 (or reasserts it). This modifies only the listening port — it does not inspect or restrict the source IP of incoming admin connections. As a result, it has no capability to limit administrative access to the 192.168.1.0/24 subnet, and the option is solely a port configuration, not a security policy.