hello,
I have 2 WANs with static IPs . Wan1 is our main internet and WAN2 is the backup which when the WAN1 has problems , I manually enables it’s mangle and it works fine. When wan1 is working i can connect to router from home with l2tp ipsec from wan1’s ip and wan2’s ip but when wan1 is not working i can not connect to router with vpn at all. Here is my configuration:
/ip firewall mangle
add action=mark-connection chain=input comment=WAN1 in-interface=\
WAN1 new-connection-mark=M_WAN1 passthrough=yes
add action=mark-routing chain=output connection-mark=M_WAN1 \
new-routing-mark=WAN1 passthrough=no
add action=mark-routing chain=prerouting comment=\
"A_Route WAN1 192.168.32" dst-address-list="!Ip static WAN1" \
new-routing-mark=WAN1 passthrough=yes src-address=192.168.32.0/24
add action=mark-connection chain=input comment=WAN2 in-interface=ether2_WAN2 \
new-connection-mark=M_WAN2 passthrough=yes
add action=mark-routing chain=output connection-mark=M_WAN2 new-routing-mark=\
WAN2 passthrough=no
add action=mark-routing chain=prerouting comment="B_Route WAN2_Redirect" \
disabled=yes dst-address-list="!Ip static WAN2" new-routing-mark=WAN2 \
passthrough=yes src-address=192.168.32.0/24
/ip route
add comment="Route WAN1" distance=1 Gatewway=172.10.20.1 pref-src=\
1.1.1.1 routing-mark=WAN1
add comment="Route WAN2" distance=1 Gateway=ether2_WAN2 pref-src=\
2.2.2.2 routing-mark=WAN2
add comment="Default Route to Internet - WAN1" distance=1 Gateway=\
172.10.20.1 pref-src=1.1.1.1