Skip to content
Back — Vendor Center
Vendor Center

Fortinet Center

FortiGate CLI basic commands for firewall policies, VPN and system diagnostics at a glance.

View commands

Firewall Policies

config firewall policy edit 0 set srcintf "port1" set dstintf "port2" set action accept next end

Create a new firewall policy via CLI

get firewall policy

List all existing policies

diagnose sys top

Show 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 end

Set up a Phase 1 tunnel for site-to-site VPN

diagnose vpn ike gateway list

Show status of all IKE gateways

diagnose vpn tunnel list

List active VPN tunnels and their status

Diagnostics & Logs

diagnose debug flow trace start 10

Trace packet flow live for troubleshooting

execute log filter category 0 execute log display

Filter and display traffic logs

get system status

Show firmware version and system status

How it works

1

Choose a topic

Policies, VPN or diagnostics.

2

Copy a command

Paste directly into the FortiGate CLI.

3

Get the cheat sheet

Download all commands as PDF.

Benefits

✓
Free
✓
3 topic areas
✓
Copy & paste
✓
GDPR Friendly

Good to know about this tool

What does this tool do?

Provides a curated collection of frequently used FortiGate CLI commands for firewall policies, IPSec VPN and diagnostics.

Why does it exist?

Because FortiGate firewalls are widely used in enterprises and admins often need quick access to CLI reference commands.

Typical use cases
    Best practices & notes

      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.

      Disclaimer

      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.

      Was this tool helpful?

      Need personal support? Our team can help with anything beyond this tool.

      Advertisement

      Need professional IT support?

      Our team can help if the free tool is not enough for your project.