This repository contains focused FortiGate CLI examples for common administration tasks. Each command block is an independent reference snippet, not a complete configuration to paste into a device.
All examples target FortiOS 8.0.0 and were reviewed on 2026-07-21 against the Fortinet 8.0.0 Administration Guide and CLI Reference. Older FortiOS releases are not supported by this repository; use their matching Fortinet documentation instead of adapting these examples with legacy syntax.
Command availability still depends on the FortiGate model, operating mode, enabled features, and licensing. Hardware switches, virtual VLAN switches, trunks, transceiver information, EMAC VLANs, and some acceleration features are not available on every appliance or FortiGate-VM.
Official FortiOS 8.0.0 references:
| File | Examples included |
|---|---|
FortiGateAdminSetup.conf |
Version checks, initial access, management interface settings, hostname, default route, connectivity checks, FortiCloud activation, and factory resets. |
FortiGateAdminInterfaces.conf |
Physical interfaces, VLANs, address objects, firewall policies, NAT, hardware and software switches, trunks, aggregate and redundant interfaces, FortiOS 8.0.0 software-switch 802.1X, zones, virtual wire pairs, and EMAC VLANs. |
FortiGateAdminDHCP.conf |
DHCP server pools, DHCP relay configuration, and disabling an existing DHCP server. |
FortiGateAdminDNS.conf |
System and VDOM DNS, primary DNS databases, recursive DNS service, DDNS, DNS over TLS and HTTPS, and FortiOS 8.0.0 DNS over QUIC and HTTP/3. |
FortiGateAdminBackups.conf |
FortiOS 8.0.0 configuration backup and restore with SCP, management-station revisions, flash, USB, FTP, TFTP, SFTP backup, YAML, and full or obfuscated exports. |
FortiGateAdminCerts.conf |
Secure SCP export, import, and verification of local certificates. |
SECURITY.md |
Supported content, private reporting guidance, project scope, and safe-use recommendations. |
get system status and confirm that the device is running FortiOS
8.0.0..conf file.? or tree <branch> to confirm availability.Command fail, parse error, node_check_object, and
entry not found messages. FortiOS can accept part of a pasted block while
rejecting later lines.Notation such as <value>, {choice-a | choice-b}, and [optional-value]
describes values or alternatives and must not be pasted literally. IP
addresses, interface names, VDOMs, policy IDs, and object names are examples.
service "ALL", broad address objects, or permissive
management access are demonstrations. Apply least privilege in production.execute factoryreset and execute factoryreset2 are destructive. Confirm
the device and maintain a tested backup before using either command.This is an independent community reference, not an official Fortinet
repository. Report repository security concerns through
SECURITY.md.