Scenario
You are operating an OPNsense HA pair in active/passive. The following symptoms appear:
- Failover works but every active connection drops
pfctl -sson the backup is empty or drastically smaller than the master- Established TCP sessions to internal services reset after failover
Available evidence:
ifconfig pfsync0reportssyncok: 0, or names the wrongsyncdevorsyncpeertcpdump -n -i <sync_if> proto pfsync: no pfsync traffic from the peer. There is no port to filter on — pfsync is its own IP protocol, number 240- pfsync is configured but the firewall rule on the sync interface does not pass IP protocol pfsync (240)
Your task
Determine the cause, recover, document, and validate.
Investigation
The investigation follows the discipline taught in Part XXVIII:
- Form hypothesis, find evidence, test, validate.
- Use the available evidence above to bound the search.
- Reach one of the likely root causes.
Recovery procedure
(Do not reveal until you have reasoned through the problem.)
- Identify the failing component.
- Apply the remediation pathway.
- Validate with the verification step.
- Document the incident.
Remediation
- Confirm System → High Availability → Settings names the sync interface under “Synchronize all states via” and the peer’s sync address under “Synchronize peer IP”, on both nodes. 2. Confirm
ifconfig pfsync0shows the expectedsyncdevandsyncpeer, andsyncok: 1. 3. Add a pass rule on the sync interface for protocol PFSYNC from the peer sync IP to this node’s sync IP, and the mirror-image rule on the peer. 4. Apply, then runtcpdump -n -i <sync_if> proto pfsyncand confirm traffic in both directions. 5. Force a state build on the master and verify the backup sees it.
Verification
pfctl -ss on the backup shows the same state count as the master (within seconds). Failover test preserves long-lived TCP sessions.
Rollback
Disable pfsync on both nodes if needed. CARP failover still works without it, but every existing connection is dropped at the failover and has to be re-established by the client.
Prevention
pfsync and CARP should be enabled together. Treat the sync interface rules as a single change with HA enable: IP protocol pfsync (240) between the two sync addresses, plus the XMLRPC config-sync traffic. CARP is a separate concern — its multicast, 224.0.0.18, belongs on each VIP’s parent interface, not on the sync link. Verify with pfctl -ss on the backup before declaring HA healthy.