networking

Install Pfsense On Fortigate: Hybrid Security Guide

Deploying open source firewall software alongside enterprise hardware brings unique flexibility to hybrid network architectures. While FortiGate appliances offer high speed hardware acceleration and d

Install Pfsense On Fortigate: Hybrid Security Guide
In this story

Deploying open-source firewall software alongside enterprise hardware brings unique flexibility to hybrid network architectures. While FortiGate appliances offer high-speed hardware acceleration and deep packet inspection, pfSense (powered by FreeBSD) provides granular control, extensive package management, and customized routing options. Integrating these systems allows network administrators to build a resilient, multi-layered defense perimeter without replacing existing infrastructure.

The primary keyword target for this setup is install pfSense on FortiGate, driven by search intent focused on practical virtualization, hypervisor deployment, and cross-platform network integration. Because FortiGate devices run FortiOS on proprietary ASIC hardware rather than standard x86 bare metal, direct bare-metal installation isn't supported. Instead, administrators achieve this hybrid setup by deploying pfSense as a virtual machine on FortiGate's KVM-based virtual environments (such as FortiGate units supporting VMs or internal compute modules) or by pairing a FortiGate appliance upstream with a pfSense hardware firewall appliance in a high-availability topology.


Architectural Realities: Understanding Deployment Models

Before touching configuration files, you need to understand how FortiGate and pfSense interact. Directly flashing pfSense onto a FortiGate hardware appliance's internal storage is impossible due to proprietary bootloader structures and missing hardware drivers for FreeBSD on Fortinet ASICs.

Instead, hybrid deployments rely on two distinct approaches:

  • Virtualization Appliance Model: Running pfSense as a KVM virtual machine directly on high-end FortiGate models that support internal compute resource allocation (such as certain Enterprise and datacenter tiers).
  • Upstream/Downstream Hybrid Topology: Placing a dedicated pfSense hardware appliance behind or in front of a FortiGate firewall. The FortiGate handles edge routing, SD-WAN, and hardware-accelerated IPsec, while pfSense manages internal network segmentation, captive portals, and custom OpenVPN tunnels.

Evaluating your hardware specs and throughput requirements determines which model fits your network.


Pre-Installation Checklist and Requirements

Proper preparation prevents catastrophic misconfigurations during network integration. Gather your requirements before starting:

  • Hardware Specifications: If running a virtualized instance, ensure at least 4 GB of dedicated RAM, a dual-core vCPU allocation, and 30 GB of storage.
  • Network Interfaces: Minimum of two physical or virtual network interfaces (WAN and LAN), with VLAN trunking capability if segmenting internal traffic.
  • Backups: Take a full configuration backup of your existing FortiGate firewall using the system administration dashboard.
  • Installation Media: Download the official FreeBSD-based installer image from the Netgate pfSense CE Downloads page.

Step-by-Step Implementation Guide

Follow these steps to establish a secure hybrid network topology combining FortiGate edge protection with pfSense internal routing.

📖 Related: this story

Step 1: Configure FortiGate Upstream Interfaces

Log into your FortiGate web interface or CLI to prepare the network ports that will interface with your pfSense environment.

  1. Navigate to Network > Interfaces and configure your WAN interface with your public IP details.
  2. Create a dedicated internal trunk port (e.g., port3) configured to allow VLAN tagging for your internal zones.
  3. Set up static routes or configure Border Gateway Protocol (BGP) if routing subnets between the FortiGate core and the pfSense firewall.

Step 2: Deploy the pfSense Virtual Machine

If your FortiGate hardware supports internal hypervisors or you are deploying pfSense on a companion hypervisor (like Proxmox or ESXi) adjacent to the FortiGate:

  1. Create a new virtual machine instance with FreeBSD as the guest operating system type.
  2. Attach the installation ISO to the virtual CD-ROM drive.
  3. Allocate your network adapters, mapping em0 (or vtnet0) to the WAN bridge connected to the FortiGate interior port, and em1 to your local switch network.

Step 3: Run the pfSense Setup Wizard

Boot the virtual machine and proceed through the initial console configuration prompts:

  1. Accept the copyright and license terms to start the installer.
  2. Select Auto (UFS) or ZFS for disk partitioning based on your storage redundancy needs.
  3. Allow the installer to write files, then reboot the system upon completion.
  4. Assign network interfaces when prompted by the CLI wizard (e.g., assign vtnet0 as WAN and vtnet1 as LAN).

Step 4: Import and Map Firewall Rules

Translating rules from an existing FortiGate security policy to pfSense requires careful mapping of firewall aliases and object groups.

  1. Access the pfSense web GUI via the designated LAN IP address using administrative credentials.
  2. Navigate to Firewall > Aliases to recreate your IP and port groups.
  3. Configure your rules under Firewall > Rules, ensuring that state tracking and logging are enabled for troubleshooting.

Post-Installation Hardening and Verification

Once the hybrid setup is running, securing the administrative boundaries is critical.

  • Restrict Management Access: Disable HTTP access to the pfSense GUI, enforce HTTPS with valid certificates, and restrict SSH access to specific jump hosts on your management VLAN.
  • Configure High Availability (CARP): If running redundant firewalls, set up Common Address Redundancy Protocol (CARP) on pfSense to match FortiGate's High Availability (HA) cluster behavior.
  • Verify Failover: Disconnect the primary uplink cable to verify that traffic routes correctly through the secondary path without dropping active sessions.

Common Pitfalls and Troubleshooting

  • Asymmetric Routing: This occurs when traffic enters through the FortiGate but leaves through pfSense without proper state tracking. Ensure Network Address Translation (NAT) is correctly configured on the boundary firewall.
  • VLAN Tag Mismatches: If internal subnets cannot reach the gateway, check that trunk ports on both the FortiGate switch and the hypervisor vSwitch allow identical VLAN IDs.
  • High CPU Utilization: Software packet filtering in virtualized pfSense instances can saturate vCPUs under heavy load. Tune your firewall optimization options in pfSense settings under System > Advanced > Networking.

Frequently Asked Questions

Can I run pfSense natively on FortiGate hardware?

No. FortiGate hardware runs proprietary FortiOS optimized for custom ASICs and network processors. pfSense requires standard x86 architecture and FreeBSD drivers, meaning it must run either as a virtual instance on supported hypervisors or on separate hardware alongside your FortiGate.

How do I handle VPN tunnels in a hybrid setup?

It's best to terminate high-throughput site-to-site IPsec tunnels on the FortiGate to utilize hardware acceleration, while letting pfSense manage client-facing OpenVPN or WireGuard remote access connections if custom user authentication plugins are required.

What is the performance impact of virtualization?

When allocated sufficient vCPU cores and dedicated RAM, a virtualized pfSense instance easily handles gigabit throughput. Performance bottlenecks typically stem from hypervisor network driver configurations rather than the firewall software itself.

How do I back up my hybrid configuration?

Maintain separate configuration backups for both systems. Export the XML configuration from pfSense via Diagnostics > Backup/Restore, and save the system configuration script from your FortiGate administrative panel.

SB

Written by

Samuel Baker

Samuel Baker approaches each story with intellectual curiosity and a commitment to fairness, earning the trust of readers and sources alike.

More from networking