OPNsenseLab
Flat isometric illustration of a dark teal firewall appliance with a glowing control panel beside a flat grey box, a pale shield floating in front.
Getting Started

OPNsense Training: A Self-Paced Learning Path

A staged OPNsense training path for homelab operators: seven lab exercises from first install to CARP failover, each with a build and a verification step.

By OPNsenseLab Editorial · · 11 min read

There is no shortage of OPNsense tutorials. What is missing is an order. Most people land on a VLAN guide before they can read the live firewall log, or attempt multi-WAN before they understand that rules are evaluated per interface, first match wins. The result is a firewall that half works and a stack of browser tabs nobody can sequence.

This page is a syllabus, not a tutorial. Seven stages, each with three things: what you must be able to do, the lab to build, and the check that proves it. Work through them in order and the awkward concepts arrive when you already have the vocabulary for them. Every stage links to the full write-up on this site.

Budget roughly 90 minutes per stage if you are new to firewalls, less if you have run one before. That is a workshop’s worth of material spread over seven sittings, which is a far better way to absorb it than a single weekend.

Before stage one: build a lab that is not your house

The single most important setup decision is that your learning firewall must not be your household gateway. You need to be free to lock yourself out, break DNS, and roll back. You cannot do that on the box everyone else’s Netflix depends on.

Three workable lab options, cheapest first:

  • A VM on hardware you already own. Installing OPNsense on Proxmox VE is the best of these, because snapshots make every mistake free. Build the bridges before you touch the VM and decide VirtIO versus e1000 deliberately.
  • A spare x86 box with two network ports. Any machine meeting the documented reasonable specification — 1 GHz dual-core, 4 GB RAM, 40 GB SSD — is enough for everything in this path. The OPNsense hardware sizing documentation has the full table.
  • A second-hand mini PC. If you already know this is going to become your real gateway, buy once. The best mini PC for an OPNsense homelab guide covers current boxes, and best hardware for OPNsense covers the wider range including used enterprise gear.

One thing the lab cannot be: a Raspberry Pi. OPNsense publishes amd64 images only, and the reasons and alternatives are covered in OPNsense on Raspberry Pi.

Two habits to adopt on day one, before you learn anything else:

  1. Export the config before every change. System ▸ Configuration ▸ Backups. It is a single XML file and it restores in under a minute.
  2. Install to ZFS. The installer offers it, and it gives you boot environments — a rollback target when a firmware update or a bad change leaves you unable to reach the GUI.

Stage 1 — Install, reach the GUI, and update

You must be able to: get from a blank disk to a working web interface, assign interfaces correctly, and complete a firmware update.

Build: a single-WAN, single-LAN install. Follow the OPNsense initial setup guide end to end: installer options, interface assignment, WAN and LAN addressing, and the first-boot hardening steps.

Check: the LAN client gets a DHCP lease from OPNsense, the dashboard shows a WAN gateway that is online, and System ▸ Firmware ▸ Updates completes cleanly and reboots into the new version. If you cannot update, nothing later in this path is safe to run.

The concept to leave with: OPNsense assigns roles to physical ports, and the assignment is separate from the addressing. Half of all “I cannot reach the GUI” problems are an interface assigned to the wrong NIC.

Stage 2 — Rules, NAT, and reading the log

You must be able to: state what happens to a packet, in order, and prove it from the live log.

Build: work through OPNsense firewall rules explained for beginners. Then deliberately break something: block a single LAN host’s outbound HTTPS, confirm it breaks, and find the matching log line.

Check: you can answer three questions without guessing. Which interface does this rule live on? What is above it? Is there a NAT entry with no matching pass rule?

This is the stage everything else rests on. Rules are evaluated per interface, top to bottom, first match wins, and they are evaluated on the interface where traffic enters the firewall. Almost every “my rule does not work” thread is an ordering problem or a NAT without a pass rule.

When you are ready to write a real rule set, the site’s OPNsense Rule Builder generates an ordered plan for common goals — port forwards, VLAN isolation, VPN access — with the reason for every line and the aliases to create first. It builds a plan to copy by hand; nothing is applied for you, which makes it a good study tool as well as a time-saver.

Stage 3 — Segmentation with VLANs

You must be able to: put a device on a network that cannot reach your laptop, and explain exactly which rule stops it.

Build: the three-VLAN baseline from OPNsense VLAN configuration — IoT, Guest, Trusted — including the managed-switch tagging on the other end of the trunk.

Check: from an IoT-VLAN host, a ping to a Trusted-VLAN host fails, a DNS query to the firewall succeeds, and general internet access works. Then reverse it: Trusted reaches IoT. Asymmetric access is the whole point and it is easy to get backwards.

The pattern worth memorising here is block RFC1918 first, then allow internet. Get that order wrong and your guest network can browse your NAS.

Stage 4 — Remote access with WireGuard

You must be able to: get back into your own network from a phone on mobile data, and explain which two rules made it possible.

Build: the road-warrior configuration in OPNsense WireGuard road warrior — Instance, Peers, interface assignment, and the two separate rule sets (WAN inbound UDP, then WireGuard interface outbound to LAN).

Check: a handshake timestamp that updates, and traffic that actually reaches a LAN service. A handshake with no traffic means the interface rules are missing, which is the single most common failure here.

This stage is where stage 2 pays off. If assigning the WireGuard interface and writing rules on it feels arbitrary, go back to the rules guide rather than pushing through.

Stage 5 — Publishing services safely

You must be able to: put one HTTPS front door in front of several internal services, with certificates that renew themselves.

Build: HAProxy reverse proxy on OPNsense with Let’s Encrypt. The first step — moving the firewall’s own GUI off port 443 — is the one people skip and then spend an hour debugging.

Check: two hostnames resolve to the same public IP, terminate on the firewall, and route to different backends. The ACME client shows a certificate with a future renewal date.

Stage 6 — Seeing what is on the wire

You must be able to: tell the difference between detection and prevention, and decide which one you actually want on.

Build: OPNsense Suricata IDS/IPS setup in alert-only mode first. Enable ET Open, watch the alerts for a few days, and tune the noise before you switch anything to drop. Then, if you want application-layer visibility rather than signature matching, add Zenarmor on OPNsense and compare what the two tell you about the same traffic.

Check: a triggered alert you can explain, and a false positive you have suppressed deliberately rather than by disabling a whole category.

Budget warning: this is the stage that changes your hardware requirements. Inline IPS is single-flow CPU-bound and can cut usable throughput by half or more. If the lab box starts struggling here, that is the signal to read the hardware guides rather than to blame the software.

Stage 7 — Staying up

You must be able to: survive one uplink failing, and then one firewall failing.

Build, in this order:

  1. OPNsense multi-WAN failover with gateway groups — two uplinks, realistic gateway monitoring, outbound NAT for both, and the DNS handling that everyone gets wrong.
  2. OPNsense high availability with CARP — two nodes, CARP virtual IPs, pfsync state synchronisation, and the addressing plan you must do first.

Check: unplug the primary WAN and watch traffic move without a manual step. Then, on the HA pair, reboot the primary node and confirm existing connections survive rather than resetting.

Do not attempt stage 7 on the household gateway until it has worked twice in the lab. Multi-WAN and CARP both fail in ways that are invisible until the moment you need them.

The parallel track: choosing and sizing hardware

Run this alongside the stages rather than before them, because your hardware requirements are a function of which features you end up enabling — and you will not know that until stage 6.

The one specification that is not negotiable: Intel NICs. The OPNsense hardware documentation says Intel chipsets deliver higher throughput at reduced CPU load, and inline IPS in particular is unreliable on Realtek parts.

Official and third-party training

This path is deliberately built from free material, but three official resources are worth knowing about:

  • The documentation is the spine. docs.opnsense.org is unusually good for an open-source project and is the correct arbiter when a tutorial and the manual disagree. Read the manual page for any feature before the blog post about it.
  • The Official OPNsense Introduction Course, presented by trainer Maher Haddad, is linked directly from the project’s download page, which also links a free beginners bundle. It is a structured video introduction rather than a certification track.
  • “Practical OPNsense” by Markus Stubbig is bundled as an e-book with the OPNsense Business Edition licence and is also sold separately. The Business Edition itself is worth knowing about for a different reason: it runs a more conservative release train than the community edition, which matters more on a production gateway than in a lab.

If your background is Cisco or MikroTik, none of it transfers cleanly. OPNsense is a stateful pf firewall with a GUI, not a router with an ACL list, and the mental model differs most exactly where it looks most similar.

How to practise like a workshop

Reading the stages is not the same as being able to do them. Three drills that turn knowledge into competence:

  • Break-and-fix. Snapshot the VM, have someone else change one setting, then find it from symptoms alone. Rule order, an interface reassignment, and a wrong gateway monitor IP are the three that teach the most.
  • Rebuild from backup. Wipe the lab firewall and restore from the config XML. If the restore does not produce a working firewall, your backup habit has a gap and you want to find it now.
  • Write the plan before the click. For any change, write the ordered rule list and the reason for each line first. The Rule Builder does this for common scenarios and is a good template for the ones it does not cover.

Where to go after stage 7

At that point you can install, segment, publish, inspect, and fail over. The remaining depth is mostly in three directions: DNS (Unbound with DNS-over-TLS and blocklists), observability (the Telegraf plugin into InfluxDB and Grafana), and routing protocols if your network has grown enough to need them.

One decision worth revisiting once you actually know the platform rather than before: whether OPNsense is the right choice at all for your situation. The OPNsense vs pfSense comparison for homelabs covers licensing, update cadence, and the specific plugins that only exist on one side. It is a much easier read after stage 4 than before stage 1.

FAQ

How long does it take to learn OPNsense?

Working through a staged path at roughly 90 minutes per stage, the seven stages here amount to about ten to twelve hours of lab time, typically spread over several weeks. Reaching the point of running OPNsense as a household gateway confidently usually takes the first four stages — install, rules, VLANs, and remote access. High availability and multi-WAN are worth deferring until the basics are automatic.

Is there an official OPNsense training course?

Yes. The project links an Official OPNsense Introduction Course, presented by trainer Maher Haddad, directly from the download page on opnsense.org, along with a free beginners bundle. The course is bundled with an OPNsense Business Edition purchase. It is a structured video introduction rather than a formal certification programme, so plan to demonstrate lab work rather than a credential.

What is the best lab setup for learning OPNsense?

A virtual machine on hardware you already own, with snapshots, is the best learning environment because every mistake is reversible in seconds. Proxmox VE is the most common choice for this. The critical rule is that the learning firewall must not also be the household gateway, because the fastest way to learn firewall rules is to lock yourself out and recover.

Do you need networking experience before starting?

No, but you do need to be comfortable with IP addressing, subnets in CIDR notation, and the idea of a default gateway. Everything else in this path is introduced in the stage that needs it. Experience with a Cisco or MikroTik CLI helps less than expected, because OPNsense is a stateful packet filter with a GUI rather than a router with an access-control list.

What order should OPNsense features be learned in?

Install and firmware updates first, then firewall rules and NAT, then VLAN segmentation, then VPN remote access. Reverse proxying, intrusion detection, multi-WAN failover and CARP high availability come after that. The ordering matters because VLANs, VPNs and IPS all depend on understanding per-interface, first-match-wins rule evaluation, and skipping that step is what makes later features feel arbitrary.

Sources

  1. OPNsense Documentation
  2. Hardware sizing & setup — OPNsense Documentation
  3. Download OPNsense — Official Images and Introduction Course
#opnsense #training#learning-path #homelab #getting-started

Related