other default gateway for some clients

I need to use different default gateway (0.0.0.0/0 route) for some users, but to have other routes (1.2.3.0/24) working equally for all users. Any suggestions?

Make Mangle rule,

//ip firewall mangle prerouting src-address=(ur client’s ip ) action= mark routing new-routing mark= (any_name) passthrough=yes


Then add routing policy rules,

//ip routes rules add src-address=(ur clients ip) routing-mark=(any name) table=(any_name) action=lookup

Add route,


//ip routes add dst-address= (ur ip address block) Gateway=(ur new gateway) mark= (any_name)



i think it’ll work

thnxs,
raktim

no, it will just use that only route in new table, but I need first to check routes in main table, and then select default gateway based on source ip address