Route specific IP traffic from LAN Subnet to WAN specific IP

I have today in my Mikrotik the following scenario:

LAN + 2 WAN / 29

On the WAN I include 2 addresses from each ISP in their respective interface.

In mangle I have created connection marks to direct the traffic that comes through an interface to return by the same and also a basic failover on the routes with ping check in the gateway.

I need to direct an IP of the LAN Subnet to exit by specific IP of the WAN and I am having difficulty doing this. I saw many posts indicating use src-nat and to-adress = “WAN SPECIFIC IP” but it did not work.

Any tips?

use mangle rule to mark-routing, apply this to the source IP you specify.
then add a routing rule that route all traffic with this routing mark , towards specific gateway of your IP.

It’s simple. If you already mastered connection marking, just add another rule like:

/ip firewall mangle
add chain=prerouting src-address=<your LAN IP> connection-mark=no-mark action=mark-connection new-connection-mark=<your WANx mark>

Like the previous two posts state, but I will clarify and add preferencial source in route:

– Add a connection mark for src address
– add routing mark for the new connection mark
– add static route for new routing mark, but clearly state preferential source in the route. That way all connections from source address will go out using the specific WAN ip. In this way you can specify which of the two WAN IP addresses you will use for this source IP, instead of letting the NATfunction of the router decide.

Good advice from the usual ‘suspects’ but I am less knowledgeable and a tad (okay a ton) slower.
I prefer to better understand the setup/scenario before ascertaining the requirements.

  1. Two WANs
  2. What kind of load balancing is used?
  3. Do you have one as primary and the other just for failover?
  4. Do you have any port forwarding requirements (external users that need to connect to equipment or servers at your location)
  5. How many Lans do you have on your network?
  6. Do you have just one IP that needs access to WAN 2 (assuming WAN2).
  7. Do you have a service that needs access to WAN 2, or an IP (for example mail service could affect more than one IP)