Goodmorning everyone.
I have a configuration with two WANs and a bridge. The WANs are configured in load balancing with PCC and everything works correctly.
I need from the devices inside the bridge to reach a one public ip 138.68.XXX.XXX only from a single WAN (only WAN1)
I created this rule in the mangle:
add chain= prerouting action=mark-routing dst-address=138.68.XXX.XXX new routing mark=mark-server001 passtrough=no
All traffic will go out on WAN1. All traffic, must be balanced across the two WANs, with the exception of traffic directed to that specific IP address.
Thank you
Very nice Jotne!
I was going to recommend a routing solution not a source nat solution.
Source nat tells the router which public IP should be used to provide NATING for the private IP, but does not tell the router which route that trafffic should take??
When you add mangling in the mix I get right confused.
First of ALL I dont understand MARKING ANY ROUTES without having normal ROUTEs first established for the router.
So to me this should be. /ip route
add check-gateway=ping distance=1 gateway=192.168.3.75 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=“ether2 WAN2” routing-mark=to_WAN2
add distance=1 gateway=“ether1 WAN1” routing-mark=mark-server001
LIKE THIS /ip route
add check-gateway=ping distance=1 gateway=192.168.3.75
add check-gateway=ping distance=1 gateway="ether2 WAN2
"add distance=1 gateway=“ether1 WAN1”[/i]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
add check-gateway=ping distance=1 gateway=192.168.3.75 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=“ether2 WAN2” routing-mark=to_WAN2
add distance=1 gateway=“ether1 WAN1” routing-mark=mark-server001
To be honest, I dont know why the heck 192.168.3.75 is doing there,
I thought there was two WANS, one and two, does the OP have three WANS ???
Or is that the source (device that needs only to access the exterior specific WANIP).
(or is there a group of devices, its was really not made clear???).
I would use a route rule
source address=specific device OR
dst address=exterior WANIP
action= lookup only in table
table=use-this-only
where
another route is established ( a third for wan1)
add distance=1 gateway=“ether1 WAN1” routing-mark=use-this-only { and with this approach no mangling is required)