FortiGate Firewall Command List With Description

 

1. Basic Device Access & System Information

CommandDescription
get system statusShows firmware version, serial number, hostname, and uptime.
get system performance statusDisplays CPU, memory, session count, and throughput usage.
get system performance topLive CPU/memory usage (similar to top in Linux).
get system interfaceDisplays all interfaces, their IP addresses, status, and administrative state.
execute rebootReboots the firewall.
execute shutdownShuts down the firewall.
execute ping <IP>Pings an IP address to test connectivity.
execute traceroute <IP>Traces the route to an IP address.
diagnose debug config-error-log readDisplays any configuration errors.

2. Configuration Mode Commands

You must enter configuration mode to make changes:

config <section> edit <item> set <parameter> <value> next end

Example:

config system interface edit port1 set ip 192.168.1.1/24 set allowaccess ping http https ssh next end
CommandDescription
config system interfaceConfigure interface IP, VLANs, and allowed access.
config firewall policyCreate/edit firewall rules.
config firewall addressCreate/edit address objects.
config router staticAdd static routes.
config vpn ipsec phase1-interfaceConfigure VPN Phase 1 settings.
config vpn ipsec phase2-interfaceConfigure VPN Phase 2 settings.

3. Firewall Policy & Routing

CommandDescription
show firewall policyShows all configured firewall rules.
diagnose firewall iprope listShows policy route and firewall rule matching.
diagnose firewall proute listDisplays all policy-based routes.
get router info routing-table allShows the routing table.
get router info bgp summaryDisplays BGP neighbor status.
diagnose sniffer packet <interface> 'filter' <count>Captures packets on an interface (useful for troubleshooting).

4. User & Authentication

CommandDescription
config user localConfigure local user accounts.
config user groupCreate/edit user groups.
diagnose test authserver ldap <server_name> <username> <password>Tests LDAP authentication.
diagnose test authserver radius <server_name> <username> <password>Tests RADIUS authentication.

5. VPN Troubleshooting

CommandDescription
diagnose vpn ike gateway listLists all active VPN tunnels and status.
diagnose vpn tunnel listDetailed information about each VPN tunnel.
diagnose vpn ike log-filter dst-addr4 <IP>Filters VPN debug logs for a specific destination.
diagnose debug application ike -1Shows detailed IKE (Phase 1 & 2) debug logs.
diagnose vpn ike restartRestarts VPN IKE process.

6. Debug & Packet Capture

CommandDescription
diagnose debug enableEnables debug output.
diagnose debug disableDisables debug output.
diagnose debug console timestamp enableAdds timestamps to debug logs.
diagnose debug flow filter addr <IP>Filters debug logs by IP address.
diagnose debug flow trace start <count>Starts packet flow tracing.
diagnose sniffer packet <interface> 'host <IP>' 4Captures packets with detailed output.

7. Log & Event Monitoring

CommandDescription
get log eventfilterDisplays event log filter settings.
diagnose log readReads log messages.
diagnose log filter category <number>Filters logs by category.
diagnose sys topDisplays top processes using system resources.

Comments