How to choose the IP to masquerade ?

Hello, I’m trying to configure a board to use masquerade.
The board has two IPs on the “public” ethernet (let’s say A and B), and a private LAN (let’s say c) to the private ethernet.
I have configured masquerade to nat network c, but I can’t force to use ip B in the masquerade, always routerboard chose ip A to nat network c.

This is not a problem if A and B was public IP’s, but not, A is private (my backbone) and B is the public routeable IP in the internet.

Any idea on how to tell masquerade to use ip B instead ip A to nat the packets ?

Regards,
Jack.

Masquerade will always choose the route with the lowest weight and take the preferred source of that subnet or route. Adjust the preferred address for that route, or use src-nat as the action instead of masquerade.