By Manny Fernandez

March 25, 2026

Monkey Bites – Factory Reset(s)

Monkey Bites – Factory Reset(s)

Prior to FortiOS 7.0, there were three commands to reset the configuration on a FortiGate, sadly, most only know the one command execute factoryreset  and are not aware of the others.  Since 7.0 we have some knew ones, mostly for VM based FortiGates.  Let’s take a look at them.

Prior to FortiOS 7.0

execute factoryreset – This is the one everyone should be familiar with. It wipes the config completely.
execute factoryreset-shutdown – Reset to factory default and shutdown the device
execute factoryreset2 – Reset to factory default but keeps the IP addresses and the static routes.  When I was an MSSP, this was the only reset we used.

After FortiOS 7.0 (VM Versions)

execute factoryreset keepvmlicense – Immediately reset to factory defaults and reboot. If keepvmlicense is specified (VM models only), the VM license is retained after reset.  Great for lab environments as well.

execute factoryreset-shutdown keepvmlicense Immediately reset to factory defaults and shutdown. If keepvmlicense is specified (VM models only), the VM license is retained after reset.

execute factoryreset2 keepvmlicense. Reset to factory default, except system settings, system interfaces, VDOMs, static routes, and virtual switches. If keepvmlicense is specified (VM models only), the VM license is retained after reset.

NOTE: The previous commands are still available.

After FortiOS 7.0 (FortiManager)

execute factoryreset-for-central-management – Resets the configuration but leaves the FortiManager configuration.  NOTE: It will not keep the IP address.  If you do this remote, gas up the truck, cause you are doing a truck roll.

Hiding an Internet-Facing FortiManager: Why fgfm-deny-unknown Isn’t Enough

Hiding an Internet-Facing FortiManager: Why fgfm-deny-unknown Isn’t Enough

fgfm-deny-unknown won't protect an Internet-facing FortiManager. Fix FortiManager internet exposure with a zero-downtime move to an inside IP over VPN.

Read More
Fortinet Support Ticket: P1 to P4 Priority and SLA Guide

Fortinet Support Ticket: P1 to P4 Priority and SLA Guide

Open a Fortinet support ticket the right way: what each status means, P1 to P4 priority, severity, and the SLA for FortiCare Essential, Premium...

Read More
Fortinet ZTNA Explained: What It Is and How It Works

Fortinet ZTNA Explained: What It Is and How It Works

How Fortinet ZTNA actually decides who gets in: EMS-signed device certificates, user authentication, live posture tags, and per-app policy on the FortiGate access proxy....

Read More