A little help to configure a NAT

Hello ,

I’m facing a unusal case today . for a network i’m trying to install
the devices are connected to the same network with fixed ip’s ,
some are using GW1 and other GW2 in their network setting.

i given two IP’s to my bridge where the devices are connected
i need help to configure a nat firewall ,
i just want write some nat rules to forward to gw1(192.168.0.1) when 192.168.2.1 is used as gateway
and an other to forward to gw2(192.168.0.2) when 192.168.2.2 is used as gateway

i know this is quite unusual , but the devices have specials settings that make them switch gateway from time to time to load-balance.
Because of this this is important that the devices continue accessing the gateways from two differents ip’s

Is this what you need?

Switching WANs by Host Gateway Selection

Why just don’t use VRRP or VRRP+OSPF?

Hello Sob , thanks you , i didn’t know about VRRP,
i will try to implement that solution monday

thaks