Runbook: Deploy a New OPNsense Firewall
1 · Prerequisites
Confirm every item is in place before any state change.
- OPNsense 25.x installer image (USB or ISO)
- Console access to the target host (physical KVM or VM console)
- Network plan: WAN type (DHCP/PPPoE/static), LAN subnet, gateway IP
- Out-of-band management path (separate management VLAN or serial)
2 · Pre-checks
Read-only diagnostic commands. If any of these don't match expected output, stop and investigate further.
- · Confirm host hardware is on the OPNsense HCL or is a supported VM configuration
- · Verify the installer checksum against the signed release on opnsense.org
- · Confirm WAN medium is connected (modem/ONT/ISP hand-off) and link is up
- · Document the planned LAN IP, CIDR, and management admin password in the change record
- · Capture a baseline of any prior device on this segment (MAC table, existing gateway IP) so you can revert
3 · Procedure
Execute each step in order. Verify the expected output of a step before moving to the next.
- 1Boot the host from the OPNsense installer media and select "Install (UFS)" or "Install (ZFS)" depending on platform support; for production use ZFS on a mirrored pair if available.
- 2Complete the guided installer: accept license, set keyboard layout, set hostname (e.g. fw-edge-01), set domain (e.g. corp.example.com), set root password.
- 3After install reboot, at the console menu, assign WAN and LAN interfaces by typing the numbered interface list; LAN must be assigned before the anti-lockout rule is generated.
- 4Set the LAN IP/CIDR (e.g. 192.0.2.1/24) and disable the IPv6 track interface if not in use.
- 5Set the WAN type at the console: "Configure WAN interface" → DHCP, static, or PPPoE; confirm the WAN obtains an address with
ifconfig <wan_if>and a default route withnetstat -rnat the console. - 6From a host on the LAN segment, browse to https://<lan_ip> and accept the self-signed certificate; log in as
rootwith the console password. - 7Run through the setup wizard: set the timezone, change the admin password (rotate off the installer root password), set the primary DNS (use Unbound resolver mode unless split-horizon is required).
- 8In System > Firmware > Status, click "Check for updates" and apply the latest patches; reboot if the kernel changed.
- 9Disable services you do not need: System > Settings > Cron (clear noise), Services > Intrusion Detection (leave off until tuned), Services > Unbound DNS (keep, but harden access lists).
- 10Enable secure admin access: System > Settings > Administration, change HTTPS port off 443 only if required, restrict Web GUI access to a management alias, set session timeout.
- 11Add a single management workstation to a
mgmt_hostsalias and create a floating "allow management" rule above any block; keep anti-lockout enabled until the rule is verified. - 12In System > Configuration > Backups, download an encrypted config backup named
fw-edge-01-baseline-<date>.xmland store it in the change record; record the installer version, kernel version (uname -a), and installed packages list (pkg info).
4 · Verification
Confirm the procedure actually fixed the problem.
- ✓
ping -c 3from a LAN host to 8.8.8.8 returns 0% loss - ✓
pfctl -srat the OPNsense shell shows the default deny rules plus the anti-lockout rule on LAN - ✓Web GUI is reachable only from the management alias (intentional block from the LAN)
- ✓Firmware status page shows "up to date" and matches the last_verified version
- ✓Encrypted config backup file is present in the change record and decodes with the documented passphrase
5 · Rollback
If verification fails, undo the procedure in reverse order.
- ↶Reboot to the installer media and choose "Restore from previous install" only if ZFS boot environments are enabled; otherwise, re-image from the baseline ISO.
- ↶Restore the captured previous device (or its gateway IP) to the segment so downstream hosts are not stranded.
- ↶If WAN/LAN cabling was re-patched, return patch panel ports to the documented baseline.
- ↶Open a rollback incident and attach the failed config backup; do not delete evidence until post-mortem closes.
6 · Escalation
When the runbook isn't enough, contact:
- · If the installer does not detect a NIC, escalate to hardware/platform team: OPNsense 25.x ships a small set of FreeBSD 14 drivers; unsupported NICs need an add-in card from the supported list.
- · If WAN never obtains an address after 5 minutes (DHCP), involve the ISP: confirm the modem is in bridge mode, check PPPoE credentials, and request a line-side check.
- · If the GUI is unreachable after anti-lockout, use the console menu option "Reset web GUI access" and re-establish a temporary laptop connection directly to the LAN port.
- · If a critical CVE is active for the released version, escalate to the security team before proceeding; do not deploy an unpatched image to a perimeter role.
Purpose
This runbook deploys a new OPNsense firewall end-to-end, from the installer media to a verified baseline on the network. It covers the first-boot console assignment, the GUI setup wizard, baseline hardening, and a config backup that becomes the recovery point for every subsequent change.
When to use this runbook
Use this runbook when a brand-new OPNsense host is being installed at a network edge, branch office, lab boundary, or DMZ choke point where no prior config exists. It is the starting point for every downstream runbook in this set: do not skip the backup step at the end, because rollback procedures elsewhere assume a known baseline.
Pre-checks
- Confirm host hardware is on the OPNsense HCL or is a supported VM configuration (NIC, CPU, storage controller).
- Verify the installer checksum against the signed release on
opnsense.org; do not deploy an unverified image to a production role. - Confirm the WAN medium is up: modem/ONT link lights, patch lead is in the documented port, ISP hand-off is active.
- Document the planned LAN IP, CIDR, management admin password, and timezone in the change record before starting.
- Capture the prior state of any device being replaced: existing gateway IP, MAC table, and any client static routes.
Procedure
- Boot from installer media. Attach the USB stick or attach the ISO to a VM, boot, and at the loader menu pick
Install (ZFS)on capable hardware (mirrored pair preferred) orInstall (UFS)for simpler single-disk installs. Choose guided partitioning for production hosts. - Complete the installer. Accept the license, set keyboard layout, hostname (e.g.
fw-edge-01), domain (e.g.corp.example.com), and a strong root password. The installer will write the bootloader and prompt for a reboot. - Assign WAN and LAN at the console. After reboot, log in as
rootand pick option1(Assign interfaces). Note the detected NIC list; pick the WAN interface first, the LAN second. OPNsense generates an anti-lockout rule on the LAN only when LAN is assigned — never skip this step. - Set LAN addressing at the console. Choose option
2to set the LAN IP and mask (e.g.192.0.2.1/24). Decline IPv6 track interface unless you have a concrete plan for IPv6 on this segment. - Set WAN addressing at the console. Choose option
2for the WAN interface and pick DHCP, static, or PPPoE. Confirm withifconfig <wan_if>that an address is present andnetstat -rnshows a default route via the WAN gateway. - Reach the GUI from a trusted management host. Plug a laptop directly into the LAN port with a static address in the LAN subnet, browse to
https://<lan_ip>, accept the self-signed cert, and log in asrootwith the console password. - Run the setup wizard. Set timezone (correct this before NTP matters), change the admin password (rotate off the installer root), pick Unbound in resolver mode unless split-horizon is required, and enable the default block-private-networks and block-bogon rules on WAN.
- Patch to current. Open System > Firmware > Status, click
Check for updates, apply patches, and reboot if the kernel changed. Re-verify the GUI is reachable after any kernel reboot. - Disable noise. Turn off cron mail on misconfig (System > Settings > Cron), leave Intrusion Detection off until tuned, and leave Unbound DNS on but restrict access to LAN and the management alias (Services > Unbound > Access Lists).
- Tighten the GUI. System > Settings > Administration: restrict the WebGUI source to a
mgmt_hostsalias, set session timeout to a small value (e.g. 20 minutes), enable HTTPS-only, and consider changing the listen port off 443 if exposure scanners are noisy. - Capture the baseline backup. System > Configuration > Backups: download an encrypted backup named
fw-edge-01-baseline-<date>.xml. Record the installer version,uname -aoutput,pkg infooutput, and the change record number in the same directory as the backup.
Verification
- From a LAN host,
ping -c 3 8.8.8.8returns 0% loss. - At the OPNsense shell,
pfctl -sr | headshows the default LAN anti-lockout rule, the default block on WAN, and your management allow rule. - The Web GUI is reachable only from the management alias; an attempted login from an unmanged LAN host is rejected at the rule layer, not the GUI.
- Firmware status page shows “up to date” and matches the
last_verifiedversion in the frontmatter. - The encrypted config backup file is present in the change record and decodes with the documented passphrase.
Rollback
- Reboot to the installer media and select
Restore previous installif you enabled ZFS boot environments; otherwise, re-image from the baseline ISO. - Restore the captured previous device (or its gateway IP) to the segment so downstream hosts are not stranded without a default route.
- If WAN or LAN cabling was re-patched, return patch panel ports to the documented baseline.
- Open a rollback incident and attach the failed config backup; do not delete evidence until the post-mortem closes.
Escalation
- If the installer does not detect a NIC, escalate to the platform team: OPNsense 25.x ships a small set of FreeBSD 14 drivers; unsupported NICs require an add-in card from the supported list.
- If WAN never obtains an address after 5 minutes on DHCP, involve the ISP: confirm the modem is in bridge mode, check PPPoE credentials if applicable, and request a line-side check.
- If the GUI is unreachable after anti-lockout, use the console menu option
Reset web GUI accessand re-establish a temporary laptop connection directly to the LAN port. - If a critical CVE is active for the released version, escalate to the security team before proceeding; do not deploy an unpatched image to a perimeter role.