I've been racking my brain over this for a while and can't find a solution.
I need to create a failover with two WANs, which I successfully achieve in the following way:
/ip route
add comment="ISP1 Route IP-DNS" disabled=no distance=2 dst-address=1.0.0.1/32 \
gateway=10.2.2.1 pref-src="" routing-table=main scope=10 \
suppress-hw-offload=no target-scope=10
add comment="ISP2 Route IP-DNS" disabled=no distance=2 dst-address=8.8.4.4/32 \
gateway=10.1.1.1 pref-src="" routing-table=main scope=10 \
suppress-hw-offload=no target-scope=10
add check-gateway=ping comment="ISP1 WAN Routing 1" disabled=no distance=9 \
dst-address=0.0.0.0/0 gateway=1.0.0.1 pref-src="" routing-table=main \
scope=30 suppress-hw-offload=no target-scope=11
add check-gateway=ping comment="ISP2 WAN Routing 2" disabled=no distance=10 \
dst-address=0.0.0.0/0 gateway=8.8.4.4 pref-src="" routing-table=main \
scope=30 suppress-hw-offload=no target-scope=11
However, using this method, if I try to access the router externally through WAN2 (for monitoring, for example), I can't.
I've tried different methods with a separate routing table and mangle rules, and I can successfully connect externally through WAN1 and WAN2, but I can't get the failover to work for the endpoints connected to the LAN network.