Runbook: Configure Multi-WAN
1 · Prerequisites
Confirm every item is in place before any state change.
- OPNsense 25.x with at least one working WAN
- Second ISP connection physically terminated on a spare NIC
- IP plan for the second WAN (static, DHCP, or PPPoE)
- Out-of-band management path on a third interface (recommended)
2 · Pre-checks
Read-only diagnostic commands. If any of these don't match expected output, stop and investigate further.
- · Capture a fresh encrypted config backup before any change
- · Confirm both ISPs are physically up and link LEDs are on
- · Confirm the second WAN IP plan (static, DHCP, or PPPoE credentials)
- · Confirm the change is approved and recorded in the change management system
- · Notify stakeholders of the planned failover window if testing will drop traffic
3 · Procedure
Execute each step in order. Verify the expected output of a step before moving to the next.
- 1Assign the new interface: Interfaces > Assignments > pick the new NIC from the dropdown >
+> Save. - 2Enable and configure the new OPT interface: set IPv4 to Static / DHCP / PPPoE depending on the ISP. Set IPv6 to None unless there is a concrete plan. Save and Apply.
- 3Confirm the new WAN obtains an address:
ifconfig <new_wan>shows an IP andnetstat -rnshows a default route via the new gateway. - 4In System > Gateways, the new gateway is auto-created. Edit it: set a descriptive name (e.g.
WAN2_GW), pick the correct monitor IP (the ISP gateway or a stable public IP), and disableFar Gatewayif the gateway is on-link. - 5Set the gateway tier: pick
Tier 1for primary,Tier 2for failover,Tier 3for backup-only. Different tiers in the same group will not load-balance; tiers only matter within the same group. - 6Create or edit a gateway group: System > Gateway Groups >
+. Name (e.g.WAN_FAILOVER), set Tier 1 to WAN1, Tier 2 to WAN2. SetTrigger leveltoMember down(failover) orPacket loss(more aggressive). Save. - 7Repeat for load balancing: create a second gateway group with both WANs at Tier 1; for sticky load balancing, also create a policy-routing rule that uses the load-balance group and a sticky-address firewall rule option.
- 8Switch outbound NAT to Hybrid mode: Firewall > NAT > Outbound > set mode to
Hybrid outbound NAT rule generation. ClickGenerate rulesto recreate the per-interface mappings. - 9Verify the auto-generated rules now map internal subnets to each WAN address; add custom rules below for source-specific pinning.
- 10Add policy-routing rules: Firewall > Rules > LAN > add an
Allowrule that setsGatewayto the new gateway group. This binds LAN traffic to the failover group. - 11Set DNS resolution: System > Settings > General > set DNS servers to ones reachable on both WANs, or leave at the ISP defaults and accept that DNS may use the active WAN only.
- 12Save and apply all changes; test failover by physically disconnecting WAN1 (or setting the WAN1 gateway to
Disabledin System > Gateways). - 13Watch System > Log Files > Gateways; apinger should mark WAN1 as down within the monitor interval.
- 14Test from an internal host:
curl -4 https://ifconfig.meshould show the WAN2 IP within a few seconds of WAN1 going down. - 15Reconnect WAN1; apinger should mark it as up and traffic should return to WAN1 within the recovery interval.
- 16Document the gateway IPs, tiers, and the failover/recovery test results in the change record.
4 · Verification
Confirm the procedure actually fixed the problem.
- ✓Both WAN interfaces show
status: activeand a valid public IP - ✓In System > Gateways, both gateways show as
Onlineinitially - ✓Failing over WAN1 flips the LAN egress IP to WAN2 within ~15 seconds (one apinger cycle)
- ✓Reconnecting WAN1 returns egress to WAN1 within ~30 seconds (one cycle + recovery delay)
- ✓
pfctl -snshows outbound NAT rules mapping each internal subnet to the active WAN - ✓
pfctl -srshows the LAN policy-routing rule bound to the gateway group
5 · Rollback
If verification fails, undo the procedure in reverse order.
- ↶Disable the multi-WAN gateway group and revert the LAN rule's gateway to
default. - ↶Switch outbound NAT back to
Automatic(or the prior mode) and apply. - ↶Disable the second WAN interface and remove its assignment.
- ↶Restore the pre-change encrypted config backup from System > Configuration > Backups.
- ↶Re-patch the switch port the second WAN NIC was on back to its prior state.
- ↶Confirm all egress traffic is back on the original WAN within a minute.
6 · Escalation
When the runbook isn't enough, contact:
- · Escalate to the ISP if the second WAN never obtains an address; confirm the line is active and the credentials/PVC/VLAN match.
- · Escalate to the network team if failover occurs but traffic still drops; suspect asymmetric routing or a NAT rule pinned to the wrong WAN.
- · Escalate to security if the second WAN opens a new path to the internet that bypasses existing egress filtering; require the change record to explicitly approve the new path.
- · Escalate to the application owner if a specific application breaks on failover; common with applications that hard-code DNS or that pin to a specific IP.
Purpose
This runbook configures Multi-WAN on OPNsense: a second ISP uplink is added, gateway tiers are set, and outbound NAT and policy routing are wired so traffic fails over and recovers predictably. It is the runbook to reach for whenever the design requires more than one internet path.
When to use this runbook
Use this runbook when a second ISP is being added for redundancy or capacity, and the existing single-WAN deployment is stable. It assumes the design decision (failover-only vs load-balanced) has already been made and approved.
Pre-checks
- Capture a fresh encrypted config backup before any change.
- Confirm both ISPs are physically up and link LEDs are on the relevant NICs.
- Confirm the second WAN IP plan: static (with the ISP-supplied /29 or /30), DHCP, or PPPoE credentials.
- Confirm the change is approved and recorded in the change management system.
- Notify stakeholders of the planned failover window if the failover test will drop traffic.
Procedure
- Assign the new interface. Go to Interfaces > Assignments, pick the new NIC from the dropdown, click
+, and Save. - Configure the new OPT (WAN2) interface. Click the new OPT entry. Check Enable interface. Set IPv4 configuration type to
Static IPv4,DHCP, orPPPoEper the ISP. Set IPv6 configuration type toNoneunless there is a concrete IPv6 plan. Save and Apply. - Confirm WAN2 obtains an address. At the shell,
ifconfig <new_wan>shows an IP andnetstat -rnshows a default route via the new gateway. If the route is missing, the ISP hand-off is not yet active. - Configure the gateway in System > Gateways. The new gateway is auto-created on interface assignment. Edit it: set a descriptive name (e.g.
WAN2_GW), pick the correct monitor IP (the ISP gateway on-link, or a stable public IP like1.1.1.1), and disable Far Gateway if the gateway is on-link. - Set the gateway tier. Pick Tier 1 for primary, Tier 2 for failover, Tier 3 for backup-only. Different tiers in the same group do not load-balance; tiers only matter within the same group.
- Create a gateway group. System > Gateway Groups >
+. Name (e.g.WAN_FAILOVER), set Tier 1 to WAN1, Tier 2 to WAN2. Set Trigger level toMember down(failover) orPacket loss(more aggressive). Save. - (Optional) Create a load-balance group. Create a second gateway group with both WANs at Tier 1 for load-balanced mode. For sticky load balancing, combine this with a policy-routing rule that uses the group plus a sticky-address firewall rule option.
- Switch outbound NAT to Hybrid mode. Firewall > NAT > Outbound > Manual outbound NAT rule generation > Save & Apply. Click
Generate rulesto recreate the per-interface mappings. - Verify the auto-generated NAT rules. Confirm both internal subnets are now mapped to each WAN address. Add custom rules below for source-specific pinning (e.g. a server that must always egress on WAN2).
- Add policy-routing rules. Firewall > Rules > LAN >
+for an Allow rule that sets Gateway to the new gateway group. This binds LAN traffic to the failover group. - Set DNS. System > Settings > General > set DNS servers to ones reachable on both WANs, or leave at the ISP defaults and accept that DNS may use the active WAN only.
- Save and apply all changes. Then test failover by physically disconnecting WAN1 (or set the WAN1 gateway to
Disabledin System > Gateways). - Watch the gateway log. System > Log Files > Gateways. Apinger should mark WAN1 as
downwithin the monitor interval (default ~10 seconds). - Test from an internal host.
curl -4 https://ifconfig.meshould show the WAN2 IP within a few seconds of WAN1 going down. - Reconnect WAN1. Apinger should mark it as
upand traffic should return to WAN1 within the recovery interval (~10 seconds + delay). - Document the gateway IPs, tiers, and the failover/recovery test results in the change record.
Verification
- Both WAN interfaces show
status: activeand a valid public IP. - In System > Gateways, both gateways show as
Onlineinitially. - Failing over WAN1 flips the LAN egress IP to WAN2 within ~15 seconds (one apinger cycle).
- Reconnecting WAN1 returns egress to WAN1 within ~30 seconds (one cycle + recovery delay).
pfctl -snshows outbound NAT rules mapping each internal subnet to the active WAN.pfctl -srshows the LAN policy-routing rule bound to the gateway group.
Rollback
- Disable the multi-WAN gateway group and revert the LAN rule’s gateway to
default. - Switch outbound NAT back to
Automatic(or the prior mode) and apply. - Disable the second WAN interface and remove its assignment.
- Restore the pre-change encrypted config backup from System > Configuration > Backups.
- Re-patch the switch port the second WAN NIC was on back to its prior state.
- Confirm all egress traffic is back on the original WAN within a minute.
Escalation
- Escalate to the ISP if the second WAN never obtains an address; confirm the line is active and the credentials/PVC/VLAN match.
- Escalate to the network team if failover occurs but traffic still drops; suspect asymmetric routing or a NAT rule pinned to the wrong WAN.
- Escalate to security if the second WAN opens a new path to the internet that bypasses existing egress filtering; require the change record to explicitly approve the new path.
- Escalate to the application owner if a specific application breaks on failover; common with applications that hard-code DNS or that pin to a specific IP.