Categories

Auto Failover Between Two ISPs Static IP

Configure Interfaces

IP > Address > +
ISP 1 (172.16.0.10/24) Attached to Interface Ether1_ISP1 (Renamed from Ether1)
ISP 2 (10.10.10.20/24) Attached to Interface Ether2_ISP2 (Renamed from Ether2)
LAN (192.168.0.1/24) Attached to Interface Ether3_LAN (Renamed from Ether3)

Configure NAT: IP > Firewall > NAT > +

  • NAT > +
  • Chain = srcnat, out-interface = Ether1_ISP1, Action = masqurade
  • Apply, OK
  • NAT > +
  • Chain = srcnat, out-interface = Ether2_ISP2, Action = masqurade
  • Apply, OK

Configure Route: IP > Route

  • +: dst=0.0.0.0/0, gateway=172.16.0.1, Chek Gateway = ping
  • +: dst=0.0.0.0/0, gateway=10.10.10.1, Chek Gateway = ping
  • +: dst=0.0.0.0/0, gateway=172.16.0.1;10.10.10.1, Chek Gateway = ping

Configure Mangle: IP > Firewall >

  • Mangle > +
  • chain=input, in-interface=Ether1_ISP1, Action=mark_connection, Comment=ISP1_Conn, Passthrough=Checked
  • Mangle > +
  • chain=input, connection-mark=ISP1_Conn, Action=mark_routing, Comment=To_ISP1, Passthrough=Checked
  • Mangle > +
  • chain=input, in-interface=Ether2_ISP2, Action=mark_connection, Comment=ISP2_Conn, Passthrough=Checked
  • Mangle > +
  • chain=input, connection-mark=ISP2_Conn, Action=mark_routing, Comment=To_ISP2, Passthrough=Checked
  • Mangle > +
  • chain=prerouting, in-interface=Ether3_LAN, action=accept

Configure DNS

IP > DNS > +
DNS=8.8.8.8;8.4.4.4, Allow REmote Request = Checked

Configure Autofailover

IP > Route >
For ISP 1
Edit and set distance to 1
For ISP 2
Edit and set distance to 2

Testing

Run some connectivity tests from a device connected to the LAN. Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *