gateway failover with two dynamic IP

Hi Guys,

Got a question on gateway failover.

My network looks like:

public1 - Static IP
public2 - Dynamic IP
Private - 192.168.1.1

I use:

ip firewall nat add chain=srcnat src-address=192.168.1.0/24 action=masquerade out-interface=public1

to NAT my private NAT. However, when my public1 goes down, this setup won’t fail-over to public2 interface.

What’s my option here?

just duplicate your src-nat rule.

ip firewall nat add chain=srcnat src-address=192.168.1.0/24 action=masquerade out-interface=public1
and
ip firewall nat add chain=srcnat src-address=192.168.1.0/24 action=masquerade out-interface=public2

or just one rule:

ip firewall nat add chain=srcnat src-address=192.168.1.0/24 action=masquerade out-interface=!private