2 gateway problems

Hi

On one of the routers i have 2 internet connections:

public_1: lets say 172.16.0.1 Wan1

public_2 172.17.0.1 Wan2

And i have 2 private subnets 192.168.1.0/24 on Lan1 interface and 10.10.10.0/24 on Lan2 interface

What i want is to have 192.168.1.0/24 route out through 172.16.0.1 (basically this to be the default connection and the other 1 to be used only for 10.10.10.0/24)
and 10.10.10.0/24 to route out through 172.17.0.1

I have tried a lot of examples related to multiple gateways but none worked for me for some reason
I don’t need load balancing, i just 1 subnet to go out through 1 connection and the other one through the other connection

If anyone can give me a clue on how to do this

Thank you

you have to mask traffic from subnet A to go to gateway a and subnet B to go to route b
you have to add default gw, then add default gw with routing mark a to go to a and same for B and gw b

then in mangle mark routing accordingly. You have to have default gw without routing mark.