From 5f807a8fd6e51979bdc6af94d0d458a199a5deb8 Mon Sep 17 00:00:00 2001 From: Salomon Nieto Date: Mon, 5 Oct 2020 13:01:23 -0500 Subject: [PATCH] Failover recursive, without scripts --- route-failover | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 route-failover diff --git a/route-failover b/route-failover new file mode 100644 index 00000000..3d76f023 --- /dev/null +++ b/route-failover @@ -0,0 +1,26 @@ +#Primary ISP Gateway +:global Gateway1 "1" +#Secondary ISB Gateway +:global Gateway2 "2" +#DNS OpenDNS // Change your own hosts +:global Host1 "208.67.222.222" +:global Host2 "208.67.220.220" +/ip route +add dst-address=0.0.0.0/0 gateway=$Gateway1 distance=1 check-gateway=ping +add dst-address=0.0.0.0/0 gateway=$Gateway2 distance=2 + +/ip route +add dst-address=$Host1 gateway=$Gateway1 scope=10 +add dst-address=$Host2 gateway=$Gateway2 scope=10 + +/ip route +add distance=1 gateway=$Host1 routing-mark=ISP1 check-gateway=ping +add distance=2 gateway=$Host2 routing-mark=ISP1 check-gateway=ping + +/ip route +add distance=1 gateway=$Host1 routing-mark=ISP2 check-gateway=ping +add distance=2 gateway=$Host2 routing-mark=ISP2 check-gateway=ping + +/ip route +add dst-address=$Host1 type=blackhole distance=20 +add dst-address=$Host2 type=blackhole distance=20 \ No newline at end of file