Skip to main content
  1. Fortinet/

How to Install FortiGate VM on GNS3

·
Table of Contents

Setting up a virtual firewall in a network simulation environment allows us to test policies and configurations risk-free. Below is a step-by-step technical guide on how to download, import, activate, and access a FortiGate Virtual Machine (VM) inside GNS3.

Tested using FortiGate/FortiOS v7.6.7

Prerequisites
#

Before starting the installation process, ensure you have the following components installed and running:

  • GNS3 Architecture: GNS3 installed on your host system alongside a functional GNS3 VM (recommended for running QEMU-based virtual machines on Windows/macOS)
  • Fortinet Account: An active account on the Fortinet Support portal (https://support.fortinet.com) to download KVM system images

Step 1: Download the FortiGate KVM Image
#

  1. Navigate to support.fortinet.com and log in to your account.
  2. Go to Downloads > VM Images.
  3. Select KVM as the platform.
  4. Pick your desired FortiOS release version. I’ll be using v7.6.7. Select the New deployment of FortiGate for KVM option (zip archive).
Download FortiGate KVM image on Fortinet Support Site

Step 2: Prepare the Image File
#

  1. Extract the downloaded file, named fortios.qcow2.
  2. Rename fortios.qcow2 to match the extracted folder name while keeping the .qcow2 extension intact
Prepare FortiGate image for GNS3

Step 3: Create Appliance Template in GNS3
#

  1. Open GNS3 and go to Security Devices and select +New Template:
GNS3 security device new template
  1. New template: Install an appliance from the GNS3 server (recommended), Next.
  2. Select FortiGate under the Firewalls category and click Install.
  3. Server type: Install the appliance on the GNS3 VM (recommended), Next.
  4. Qemu binary: leave the default option, Next.
  5. Click Create a new version and enter the exact version tag (e.g., 7.6.7), OK.
  6. Image: paste the exact filename of your renamed .qcow2 file, OK.
  7. Disk image filename for hdb_disk_image: empty30G.qcow2 (default value), OK.
  8. Find your new FortiGate template on the list, click on missing file, and select the Import button.
Import image for FortiGate template on GNS3
  1. Browse to your renamed .qcow2 file, and upload it. The FortiGate version status should change to Ready to install and the .qcow2 file to found. Click Next.
Image imported for FortiGate template on GNS3
  1. Would you like to install FortiGate version 7.6.7?: Yes
  2. Finish.

The FortiGate image is now ready to be used in a GNS3 project.

GNS3 FortiGate template

Step 4: Build the Topology
#

  1. Create a new GNS3 project.
  2. Drag a FortiGate node and a Cloud node onto the canvas
  3. Connect Port1 on the FortiGate VM to the Cloud node (associated with the NAT network), eth0.
Example of FortiGate topology on GNS3
  1. Right-click the FortiGate node and select Start, then right-click it again and open the Console CLI. Wait for the system to start.

Step 5: Activate Evaluation License
#

  1. Once the FortiGate is up, log into the CLI using default credentials:
    • Username: admin
    • Password: (Leave blank - press Enter)
  2. Set a new strong password when prompted.
  3. Bind the trial license to your FortiCare account:
execute vm-license-options account-id <account-email>
execute vm-license-options account-password <account-password>
execute vm-license
Fortinet permits one active trial instance per account. Decommission existing trial instances on the Fortinet Support site if needed prior to activation.
  1. Confirm the reboot request to apply the evaluation license

Step 6: Access the Web GUI
#

  1. After rebooting, log back into the CLI and identify the assigned DHCP IP address on Port 1:
show system interface ?
  1. Open your web browser and enter https://<port1_IP>.
  2. Log in with your new admin credentials.
  3. Complete the initial setup wizard:
    • Migrate Config: Select Later.
    • Automatic Patch Upgrades: Disable (recommended for lab environments).
    • Dashboard Setup: Select Optimal.
GNS3 FortiGate dashboard

You now have a working FortiGate virtual machine with a trial license activated on GNS3.