Hello guys!. I have some issues with multiple wan connected to a RB 3011 with routeros 6.49.15. I need to know if it’s a wrong configuration that I possibly did or if it’s not possible to do it on mikrotik or maybe the problem it’s with my internet provider.
Here’s the context of my network:
The router of my ISP gives me a public network ( example 5.5.5.0/29; with 5.5.5.1 as default gateway, and from 5.5.5.2 to 5.5.5.5 are the publics ip can I use).
I have two LAN:
- LAN 1: 192.168.0.0/24
- LAN 2: 192.168.4.0/24
I need the LAN 1 (192.168.0.0) accesses to internet through the WAN1(5.5.5.2 for example) and the LAN 2 (192.168.4.0/24) accesses to internet through the WAN2 (5.5.5.3).
These are the configurations I made:
/ip firewall mangle
chain=prerouting action=mark-routing new-routing-mark=to-wan2 passthrough=yes src-address=192.168.4.0/24 log=no log-prefix=""
chain=prerouting action=mark-routing new-routing-mark=to-wan1 passthrough=yes src-address=192.168.0.0/24 log=no log-prefix=""
/ip route
dst-address=0.0.0.0/0 gateway=5.5.5.1 distance=1 scope=30 target-scope=10 routing-mark=to-wan2
dst-address=0.0.0.0/0 gateway=5.5.5.1 distance=1 scope=30 target-scope=10 routing-mark=to-wan1
dst-address=0.0.0.0/0 gateway=5.5.5.1 distance=2 scope=30 target-scope=10
/ip firewall nat
chain=srcnat action=src-nat to-addresses=5.5.5.3 src-address=192.168.4.0/24 out-interface=WAN2 log=no
chain=srcnat action=src-nat to-addresses=5.5.5.2 src-address=192.168.0.0/24 out-interface=WAN1 log=no
The first nat rule works and I can see traffic in the rule but the problem is that the second rule doesn’t have any traffic at all, which means the LAN2 (192.168.4.0/24) can acces internet but the LAN1(192.168.0.0/24) can’t.
If I switch the order of rules the LAN1 (192.168.0.0/24) can acces internet but LAN2 can’t.
Any suggestion?
Thanks you guys.