HA (CARP/pfSync) with Single ISP IP - WAN Failover, DHCP Issues, and Backup FW

Started by shaam, November 21, 2026, 11:42:55 PM

Previous topic - Next topic
Hi Community,

I'm looking for some guidance with my OPNsense HA setup. I've been working on this on weekends for the last six months, adding one piece at a time as my schedule allows, but I've run into a few issues that I haven't been able to resolve.

Environment
  • ISP provides only one public IP address. I requested a second IP, but they would not provide one.
  • ISP modem: Motorola
  • Switch: Cisco SG350-28P
  • Two OPNsense firewalls (Primary and Secondary)
  • Each firewall has:
  • - WAN interface
  • - LAN interface
  • - Dedicated interface for pfSync
Physical Connectivity

WAN Side


  • Motorola modem → Cisco switch port 21
  • Cisco switch port 22 → Primary Firewall WAN
  • Cisco switch port 20 → Secondary Firewall WAN

LAN Side

  • Cisco switch port 23 → Primary Firewall LAN
  • Cisco switch port 24 → Secondary Firewall LAN

Synchronization

  • Dedicated interface between firewalls for pfSync
  • Primary: 10.0.0.1
  • Secondary: 10.0.0.2

I also created five production VLANs on both the firewalls and the switch. Additionally, I created VLAN 99 on the switch for the WAN network.

HA Configuration

On the primary firewall under System > High Availability:

  • Selected the pfSync network
  • Configured state synchronization
  • Added the secondary firewall IP
  • Added the root credentials for configuration synchronization
  • Enabled synchronization for services and applied changes

Configuration synchronization appears to be working for firewall rules. However, VLANs did not synchronize, so I had to manually create them on the secondary firewall.

CARP Configuration

On both firewalls:

  • Configured CARP Virtual IPs
  • Interface selected: LAN

Current status:

  • Primary firewall: MASTER
  • Secondary firewall: BACKUP

LAN addressing:

  • Primary LAN IP: 192.168.1.252
  • Secondary LAN IP: 192.168.1.253
  • CARP VIP: 192.168.1.1
Issue1 - WAN IP Does Not Return to Primary After Failover

When I shut down the primary firewall, the secondary firewall became active as expected.

However, after bringing the primary firewall back online and stopping the secondary firewall, several devices stopped working and the primary firewall would not obtain the ISP WAN address.

From the CLI, I could see DHCP activity and the ISP-assigned address (something like 72.x.x.x/23), but the WAN interface in OPNsense showed no IP address.

I left the system overnight without success.

The next morning, I powered off:

  • Primary firewall
  • Secondary firewall
  • Modem
  • Switch

for about an hour. After powering everything back on, the primary firewall immediately obtained the WAN IP again and Internet access returned.

I contacted my ISP, and they said they can't manually release the IP lease on their side and suggested the issue is likely related to the firewall or modem.

Now Questions
  • How should WAN failover be configured when only a single ISP IP address is available?
  • Is there a recommended method to release or renew the WAN DHCP lease during failover?
  • Could the ISP modem be caching the MAC address of whichever firewall last obtained the lease?
  • Should I use CARP on the WAN side as well, or another approach for a single-public-IP environment?
  • Has anyone successfully implemented OPNsense HA with a single ISP-provided DHCP address?

Issue #2 - Secondary Firewall Appears to Be Serving DHCP While in BACKUP State

Despite the secondary firewall showing BACKUP status, I noticed devices appearing in its DHCP lease table.

My work laptop repeatedly lost Internet connectivity. While troubleshooting, I discovered it had received its lease from the secondary firewall.

The lease information showed DHCP Server: 192.168.1.253 (Secondary Firewall) instead of DHCP Server: 192.168.1.1 (CARP VIP)

This appears to indicate the backup firewall is still responding to DHCP requests even though it is not the CARP master.

Now Questions are
  • How can I ensure clients always receive DHCP leases from the CARP VIP (192.168.1.1)?
  • How do I prevent the backup firewall from serving DHCP while it is in BACKUP state?
  • Is there additional DHCP failover or HA configuration required beyond CARP and pfSync?
  • Could this be the reason some devices failed during testing?

Some more questions
  • Is it expected that VLANs do not synchronize through configuration synchronization and must be created manually?
  • Are there any obvious issues with my physical topology or VLAN design?
  • Is a dedicated WAN VLAN on the switch the recommended design when both firewalls share the same ISP connection?

I have attached screenshots from both firewalls and the Cisco switch. The secondary FW and switch screenshots are in the reply post, since it only allowed 4.

Any guidance, recommendations, or examples from similar deployments would be greatly appreciated. Thank you for your time and help!

Secondary firewall screenshots; I'll add the switch screenshot to the second reply. Thanks


QuoteHow should WAN failover be configured when only a single ISP IP address is available?

It should not. You should pick a contract that gives you a public /29.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Last time I asked them, they said I can't get a second IP for my home use. I guess the call center rep was new and didn't know. I'll find Cox/Specturm's corporate contact and check with someone there.

I have a couple of questions in case they won't provide a /29 public IP.
1. Can I use an IPv4 address for one firewall and IPv6 for the second one since the ISP provided both IPv4 and v6?
2. If I add a TP-Link managed switch between the modem and the firewalls, since the switch has a DHCP server, it will assign separate IPs to both FWs. Then the LAN from both FWs connects to the Cisco Switch. Does that setup work?

Thanks,

If you have a single line with a home contract what use is an HA pair of firewalls? Keep a config backup and a cold standby on the shelf and save energy, perhaps?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

No, the goal is to keep both turned on, but traffic should only transfer to the second firewall when the primary is down. Once the primary is come back online, the secondary goes back to passive mode. It'll be an active-passive setup. I am hosting a website, and I don't want it to go down because of a firewall failure. If I am home, I can rebuild the firewall, but the issue is that if I am not available, I want to have a backup so it can switch to the secondary node in case of hardware failure.