UniFi + pfSense vs OPNsense: Architecture, Licensing, and the Right Choice for Your Network
pfSense and OPNsense share a FreeBSD foundation but have diverged in governance, release cadence, and plugin policy. UniFi isn’t a firewall at all – it’s a controller for Ubiquiti gear, with the gateway living in a UDM or UXG. This page shows how the three fit together, where the licensing splits, and which deployment model (appliance or VM) makes sense for you.
What Changed
The Fork Has Fully Diverged
OPNsense moved off the original pfSense codebase: HardenedBSD hardening → mainline FreeBSD, MVC‑styled web UI, Nginx instead of Lighttpd, and date‑based releases. Compatibility with pfSense plugins is effectively gone.
pfSense CE Slowed, Plus Gated
Netgate’s free Community Edition receives irregular updates. pfSense Plus bundles newer features but is locked behind Netgate hardware or a paid subscription, turning “free” into a purchasing decision.
UniFi Split Controller From Gateway
The UDM/UXG now runs the UniFi OS controller as an app on the gateway. The controller can be self‑hosted in a container, but that path is community‑maintained – the “official” flow is controller‑plus‑gateway together.
None Are Container‑Native
Both firewalls are distributed as FreeBSD installer images (or VM images). Container images exist only as community builds and require privileged host networking, making them unsuitable for production.
pfSense Plus Adds GPU‑Accelerated Inference
From the 2025 release, pfSense Plus can off‑load AI‑inference workloads (e.g., DPI, traffic‑classification models) to CUDA‑capable GPUs via a built‑in plugin. The feature is **not** available in CE.
OPNsense Integrates a Built‑in Caddy Proxy
2026‑02 introduced an optional Caddy reverse‑proxy module with automatic TLS via Let’s Encrypt. It ships as a signed plugin, giving OPNsense a first‑class edge‑proxy out‑of‑the‑box.
Architecture
pfSense – Single Vendor Stack
FreeBSD base, PHP GUI over a single config.xml. Netgate controls the hardware, firmware, and the Plus subscription – tight integration, but a “pay‑wall” for newer features.
OPNsense – Plugin Repository
Same config.xml model, but a signed plugin repo, native GeoIP aliases, Zenarmor L7 inspection, and weekly point releases. The web layer (MVC) ships independently of the packet filter.
UniFi – Controller + Gateway
Linux‑based UniFi OS runs the controller as an app on the UDM/UXG. The controller stores its own database (Mongo‑style) and handles AP provisioning, while the gateway handles routing/NAT.
Where State Lives
pfSense & OPNsense keep everything (rules, keys, users) inside a single XML file – back it up or you lose the whole config. UniFi’s controller keeps a separate DB; the gateway’s state is recreated when re‑adopted.
State‑Sync Options
Both firewalls support remote config sync via XML‑RPC or a simple rsync‑based script. OPNsense additionally offers “Config Backup” to a cloud bucket (S3/Wasabi) out‑of‑the‑box.
Automation / API Layer
pfSense exposes a REST‑API only in the Plus edition; OPNsense ships a fully‑featured, versioned API in its free core. UniFi provides a GraphQL‑style API for device & network configuration.
Features
Firewall & NAT
Both firewalls provide stateful filtering, NAT, port forwards, aliases, and floating rules. pfSense’s rule UI is considered friendlier; OPNsense adds native GeoIP aliases and per‑rule scheduling.
VPN
OpenVPN, WireGuard, and IPsec are built‑in on all three (gateway‑side only for UniFi). OPNsense also offers client‑config export via the GUI.
IDS/IPS
Suricata (inline or passive) with Emerging Threats rules on pfSense and OPNsense. OPNsense bundles Zenarmor for free layer‑7 & TLS inspection; UniFi has no built‑in IDS/IPS.
High Availability
CARP + pfsync give active/passive HA on both firewalls (requires two boxes and a shared virtual IP). UniFi does not supply a native HA gateway.
Captive Portal
Both firewalls include a portal with voucher support. UniFi’s guest portal lives in the controller and covers Wi‑Fi guests only.
Wireless
pfSense/OPNsense can run hostapd on supported NICs (good for a single room). UniFi manages dedicated APs – roaming, band‑steering, and analytics are all controller‑driven.
Choosing
Home Lab / Tinkerer
OPNsense. Weekly releases, a real plugin repo, and no license gate let you experiment freely.
Business – Vendor Support Required
pfSense Plus on Netgate hardware, or OPNsense with a Deciso support contract. You’re paying for a 2 am phone line, not a faster packet filter.
Already All‑In on UniFi
UXG/UDM plus the UniFi controller. One dashboard, one update path – you give up deep firewall rule granularity for seamless Wi‑Fi management.
Deployment: Appliance or Virtual Machine
Bare Metal
Reference deployment. Dedicated NICs, no hypervisor overhead, full throughput. Harder to roll back – keep a config backup and console access.
Virtual Machine
Snapshots give instant rollback. Pass‑through NICs (or VLAN‑briding) preserve performance. Both pfSense and OPNsense publish ready‑to‑import VM images.
Container (lab only)
Community‑maintained images, pinned by digest. Requires host networking and privileged access; upgrades are not snapshot‑able, so use only for testing.
Official Resources
Questions for the Community
Bare metal or virtualized?
How do you roll back when an update breaks your firewall?
How often do you actually restore that config backup?
Is it a never‑used safety net, or a regularly‑tested recovery path?
Did you migrate off pfSense after the CE cadence slowed?
Where did you go, and was the rebuild worth it?
Disclaimer
This content is for educational and informational purposes only. It is not technical advice. Firmware, licensing terms, and feature sets change quickly. Test changes on a spare device, keep configuration backups off the appliance, and never expose a WAN interface without a default‑deny rule in place.
No replies yet. Be the first to join the discussion!