Practical tools for system, network, security, and operations administrators.

NET-C0705 · Vendor Guides – Firewalls

Fortinet FortiGate Commands Cheat Sheet

Keep a short list of read commands for Fortinet FortiGate, and review every change before you paste it.

Updated 25 October 2026 · Cheat Sheet

This is an original planning guide. It is not a vendor manual, an official standard, or legal advice. Example addresses use documentation ranges. Review every command before you paste it.

What this hour is for

Fortinet FortiGate Commands Cheat Sheet is a reading list, not a script. FortiGate policy is from zone to zone. Backup the configuration before the rule. A VDOM, if you use one, is named in the ticket.

Any/any is not the lab rule. One policy, one service. The backup file is the rollback. Do not restore it over a different firewall.

A show or a get or a compare is the command you run first. A command that changes the box waits until the how-to for that feature has its own ticket. You do not walk a production device with a cheat sheet open and no rollback.

192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, and 2001:db8::/32 are documentation. They belong in the note. They are not prefixes you type onto a production device because they appeared in a draft.

The change you can finish

Apply nothing during the writing of the note. When the lab window opens, it is one change on the device named in the ticket. Read the draft, then the device, then decide.

Rollback is the file or the revision you saved first. You do not invent a rollback after the only copy is gone.

  1. Confirm the hostname.
  2. Read the version.
  3. Read the one object the ticket names.
  4. Confirm a rollback file exists before any change.
  5. Do not paste a change from this sheet.
  6. Hand the change to the how-to page for that feature.

Mistakes that outlive the command

Fortinet FortiGate commands goes wrong in a small set of ways. The list is here so the ticket can forbid them before the window.

Decisions to write down

One decision for Fortinet FortiGate commands: This sheet is for reading. The platform is Fortinet FortiGate. The hostname matches. Rollback exists before a change. Secrets stay out of the note. And the feature how-to owns the change.

Checks before you call it done

Confirm this before you call the change done: The version was read. The hostname matches the ticket. No change was pasted from this page. No secret is in the note. And the next action is a named how-to, or a stop. If one of those fails, stop.

You may readYou do not treat as safe to paste
Version, hostname, and the running configA full sample from a forum
The interface, VLAN, or policy named in the ticketA second feature added because it was on the same page
The saved rollback pathA password, key, or community string
# Read first. Change later, from the feature page.
# FortiGate policy is from zone to zone. Backup the configuration before the rule. A VDOM, if you use one, is named in the ticket.
# prompt-for-this is not a secret to keep.

Before you leave the device

Fortinet FortiGate Commands Cheat Sheet ends when the hostname on the device matches the hostname in the ticket. If it does not, you are on the wrong box. Stop. A command that succeeded on the wrong box is not progress.

The draft stays a draft until a person has read the names in it. A generator does not log into the device and does not know which interface is the uplink. You delete a line that names a device, a zone, or a prefix you did not write down.

0.0.0.0/0 is not kept because a sample included it. A source you can say is the source you keep. 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, and 2001:db8::/32 are documentation. They belong in the note. They are not prefixes you type onto a production device because they appeared in a draft.

prompt-for-this is a reminder that a secret is missing. It is not a password, a key, a community string, or a pre-shared key you save in the ticket or in git. The real secret stays in the store.

One change is the window. A VLAN and a routing protocol and a VPN do not share it. If two things move and the result is wrong, you will not know which one did it. The next feature waits for its own page.

Tools for this guide

These tools run in the browser on this site. They do not log into your machines.

More in this cluster

The pillar for this page, and the next published pages filed with it.