Hi
i actually need help
i have to internet adsl line (2wan)
i have install 2 hotspots in Lan
I want only Wan1 to go in Lan1
and Wan2 to go in Lan2
any help???
/ip firewall nat
add chain=pre-hotspot action=accept dst-address-type=!local hotspot=auth
/ip firewall mangle
add chain=prerouting in-interface=lan1 action=mark-routing new-routing-mark=to-wan1
add chain=prerouting in-interface=lan2 action=mark-routing new-routing-mark=to-wan2
/ip route
add dst-address=0.0.0.0/0 routing-mark=to-wan1 gateway=1.1.1.1 distance=0
add dst-address=0.0.0.0/0 routing-mark=to-wan2 gateway=2.2.2.2 distance=0
add dst-address=0.0.0.0/0 gateway=1.1.1.1 distance=1
add dst-address=0.0.0.0/0 gateway=2.2.2.2 distance=2
Thankx for replyPrevent Hotspot traffic from being proxied, then assign routing marks based on in-interface, then add default routes out the appropriate WAN provider as per the routing marks, then have fall through default routes in case a provider goes down. This assumes a whole bunch of stuff, but given that you're providing virtually no details that's all anyone can do at this point.
Code: Select all/ip firewall nat add chain=pre-hotspot action=accept dst-address-type=!local hotspot=auth /ip firewall mangle add chain=prerouting in-interface=lan1 action=mark-routing new-routing-mark=to-wan1 add chain=prerouting in-interface=lan2 action=mark-routing new-routing-mark=to-wan2 /ip route add dst-address=0.0.0.0/0 routing-mark=to-wan1 gateway=1.1.1.1 distance=0 add dst-address=0.0.0.0/0 routing-mark=to-wan2 gateway=2.2.2.2 distance=0 add dst-address=0.0.0.0/0 gateway=1.1.1.1 distance=1 add dst-address=0.0.0.0/0 gateway=2.2.2.2 distance=2
Wan, of course .i have one douts:!
add dst-address=0.0.0.0/0 routing-mark=to-wan1 gateway=GATEWAY OF LAN OR WAN? distance=0
Oh, really - in older versions of RouterOS distance could be 0.Thankx again!!
But when i tried this
add dst-address=0.0.0.0/0 routing-mark=to-wan1 gateway=1.1.1.1 distance=0 ////=== distance it cant be = 0 >
/ip route
add dst-address=0.0.0.0/0 routing-mark=to-wan1 gateway=1.1.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 routing-mark=to-wan1 gateway=2.2.2.2 distance=2
add dst-address=0.0.0.0/0 routing-mark=to-wan2 gateway=2.2.2.2 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 routing-mark=to-wan2 gateway=1.1.1.1 distance=2