Fortinet Center
FortiGate CLI basic commands for firewall policies, VPN and system diagnostics at a glance.
View commandsFirewall Policies
config firewall policy
edit 0
set srcintf "port1"
set dstintf "port2"
set action accept
next
endCreate a new firewall policy via CLI
get firewall policyList all existing policies
diagnose sys topShow real-time system load
IPSec VPN
config vpn ipsec phase1-interface
edit "vpn-tunnel"
set interface "wan1"
set remote-gw 203.0.113.1
next
endSet up a Phase 1 tunnel for site-to-site VPN
diagnose vpn ike gateway listShow status of all IKE gateways
diagnose vpn tunnel listList active VPN tunnels and their status
Diagnostics & Logs
diagnose debug flow trace start 10Trace packet flow live for troubleshooting
execute log filter category 0
execute log displayFilter and display traffic logs
get system statusShow firmware version and system status
How it works
Choose a topic
Policies, VPN or diagnostics.
Copy a command
Paste directly into the FortiGate CLI.
Get the cheat sheet
Download all commands as PDF.
Benefits
Good to know about this tool
Provides a curated collection of frequently used FortiGate CLI commands for firewall policies, IPSec VPN and diagnostics.
Because FortiGate firewalls are widely used in enterprises and admins often need quick access to CLI reference commands.
Frequently Asked Questions
Do the commands work on all FortiOS versions?
The basic syntax is stable across most versions — for older or very new versions, check against the FortiOS CLI reference.
The information, templates, scripts, calculations and recommendations provided are intended for educational and assistance purposes only. Always review and test any generated result before production use. IT Smart Service accepts no liability for misuse, data loss, outages, security incidents, or legal, financial or technical damages arising from incorrect or improper use. Responsibility for validation, testing and deployment decisions rests with the user.
Related Tools
Need personal support? Our team can help with anything beyond this tool.
Need professional IT support?
Our team can help if the free tool is not enough for your project.
