Forti Wizard Cheater: bulk comment cleanup for FortiGate configs

Forti Wizard Cheater: bulk comment cleanup for FortiGate configs


Live tool: https://fortiwizardcheater.busselot.org
Source code: https://github.com/Rednas1992/Forti_Wizard_Cheater

Why this tool?

I built this tool because I like using FortiGate’s VPN Wizard. It gives me a consistent way to set up VPNs mainly for remote-access VPNs (not site-to-site, which often varies by situation). However, the Wizard automatically adds comments like “created by … wizard” to everything it creates. Some colleagues don’t want me to use the Wizard, even though it produces the same result we’d configure manually, just faster… To avoid that debate, I wrote this script. It scans the configuration for those Wizard comments and generates simple CLI commands to remove them. I also made the tool a bit broader: there’s a wildcard option so I can quickly find and strip other comment patterns in the future, not just the Wizard ones. Consistent remote-access VPNs with the FortiGate Wizard, minus the “created by … wizard” clutter, found and removed via one-click CLI, with wildcard search for other patterns.

What the app does

  • Parses your FortiGate config (.conf/.txt) client-side (no data leaves the browser).
  • Finds all set comment / set comments entries and shows them with their context path (including VDOM nesting).
  • Generates minimal, safe CLI blocks that unset comment at the exact location.
  • Search modes (mutually exclusive), plus a fallback:
    1. Wizard mode: only show comments containing created by … wizard.
    2. Wildcard mode: filter comments using your own wildcard (supports * and ?, case-insensitive).
    3. Neither checked: list all comments.

Privacy & security

Everything runs locally in your browser. The tool stores nothing and sends nothing. Don’t take my word for it — check the code on GitHub or run it locally.

Quick start (online)

  1. Open https://fortiwizardcheater.busselot.org.
  2. Upload your FortiGate config.
  3. Choose Wizard or Wildcard (or leave both off to list all comments).
  4. Click Start analysis.
  5. Copy or download the generated CLI and paste it into the FortiGate CLI (SSH/console).
  6. (Optional) Save a config revision:

Example of generated CLI

The app creates a minimal block per match that navigates to the exact context and runs unset comment.

With VDOMs, the correct VDOM context is added automatically, e.g.:

Run it locally

No build step is required.

How it works (technical)

  • Reads lines and tracks the current config path with config …, edit …, next, end (VDOM-aware).
  • Captures set comment / set comments values.
  • Filters the list per the selected mode (wizard / wildcard / all).
  • For each match, generates a minimal CLI block to unset comment at the same path.

Limitations & notes

  • Wildcard uses simple globbing (* and ?); it’s not full regex.
  • The matcher targets only set comment / set comments.
    If you also want to include set description, extend the regex in app.js (look for reCmt).
  • Very large configs may produce many matches; everything still runs client-side.

Roadmap / ideas

  • Option to include set description.
  • Regex mode in addition to wildcard.
  • Export to .bat/.sh with confirmation prompts.
  • UI polish (light/dark, compact list view).

Credits & license

Built for blog.busselot.org.
MIT License © Sander Busselot.