I have two ISPs at a branch office connected to a MikroTik RB750Gr3 running RouterOS v7.23.7 (long-term release):
Icon Plus Dedicated ISP (20 Mbps bandwidth, 1 static public IP)
IndiHome Broadband ISP (100 Mbps bandwidth, no public IP)
This branch MikroTik also connects to a WireGuard server and the head office to access local IP addresses.
I have been experimenting with various configurations found online, but I do not yet fully grasp the underlying concepts. Here is my current configuration, please help me analyze it:
/interface list
add name=WAN
add name=LAN/interface bridge
add name=bridge1_local/interface bridge port
add bridge=bridge1_local interface=ether3
add bridge=bridge1_local interface=ether4
add bridge=bridge1_local interface=ether5/interface list member
add list=WAN interface=ether1_isp_icon_plus
add list=WAN interface=ether2_isp_indihome
add list=LAN interface=bridge1_local
add list=LAN interface=ether3
add list=LAN interface=ether4
add list=LAN interface=ether5/interface wireguard
add name=wg_to_server_hypernet
add name=wg_to_server_melsa
add name=wg_to_server_headoffice/ip address
add address=103.xx.x.xx6/30 interface=ether1_isp_icon_plus
add address=192.168.1.2/24 interface=ether2_isp_indihome
add address=192.168.15.0/24 interface=bridge1_local
add address=10.5.5.114/24 interface=wg_to_server_hypernet
add address=10.6.6.114/24 interface=wg_to_server_melsa
add address=10.7.7.114/24 interface=wg_to_headoffice/ip pool
add name=pool_local ranges=192.168.15.2-192.168.15.254/ip dhcp-server network
add name=dhcp-local interface=bridge1_local address-pool=pool_local lease-time=1d disable=no/ip dns
set-server=1.1.1.1,8.8.8.8 allow-remote-requests=yes/routing table
add name=to_icon_plus fib
add name=to_indihome fib/ip route
add dst-address=0.0.0.0/0 gateway=103.xx.x.xx5 distance=1 check-gateway=ping comment="main gateway icon plus"
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=2 comment="backup gateway indihome"add dst-address=0.0.0.0/0 gateway=103.xx.x.xx5 distance=1 check-gateway=ping routing-table=to_icon_plus comment="routing table icon plus"
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping routing-table=to_indihome comment="routing table indihome"add dst-address=10.10.1.0/24 gateway=10.5.5.1 distance=1 check-gateway=ping comment="to server"
add dst-address=10.10.1.0/24 gateway=10.6.6.1 distance=2 check-gateway=ping comment="to server"
add dst-address=10.10.1.0/24 gateway=10.7.7.1 distance=3 comment="to server"add dst-address=10.10.2.0/24 gateway=10.5.5.1 distance=1 check-gateway=ping comment="to headoffice"
add dst-address=10.10.2.0/24 gateway=10.6.6.1 distance=2 check-gateway=ping comment="to headoffice"
add dst-address=10.10.2.0/24 gateway=10.7.7.1 distance=3 comment="to headoffice"/ip firewall address-list
add list=no-pcc address=192.168.15.0/24 comment="local"
add list=no-pcc address=10.5.5.0/24 comment="wg hypernet"
add list=no-pcc address=10.6.6.0/24 comment="wg melsa"
add list=no-pcc address=10.7.7.0/24 comment="wg headoffice"
add list=no-pcc address=10.10.1.0/24 comment="server"
add list=no-pcc address=10.10.2.0/24 comment="headoffice"/ip firewall mangle
add chain=prerouting in-interface-list=LAN dst-address-list=no-pcc action=accept comment="bypass local"add chain=prerouting in-interface=ether1_isp_icon_plus connection-state=new connection-mark=no-mark dst-address-type=!local action=mark-connection new-connection-mark=conn_icon_plus passthrough=no
add chain=prerouting in-interface=ether2_isp_indihome connection-state=new connection-mark=no-mark dst-address-type=!local action=mark-connection new-connection-mark=conn_indihome passthrough=noadd chain=prerouting in-interface-list=LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:3/0 action=mark-connection new-connection-mark=conn_icon_plus passthrough=yes
add chain=prerouting in-interface-list=LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:3/1 action=mark-connection new-connection-mark=conn_indihome passthrough=yes
add chain=prerouting in-interface-list=LAN connection-mark=no-mark dst-address-type=!local per-connection-classifier=both-addresses:3/2 action=mark-connection new-connection-mark=conn_indihome passthrough=yesadd chain=prerouting in-interface-list=LAN connection-mark=conn_icon_plus action=mark-routing new-routing-mark=to_icon_plus passthrough=no
add chain=prerouting in-interface-list=LAN connection-mark=conn_indihome action=mark-routing new-routing-mark=to_indihome passthrough=noadd chain=output connection-mark=conn_icon_plus action=mark-routing new-routing-mark=to_icon_plus passthrough=no
add chain=output connection-mark=conn_indihome action=mark-routing new-routing-mark=to_indihome passthrough=no/ip firewall nat
add chain=srcnat out-interface=ether1_isp_icon_plus acton=masquerade
add chain=srcnat out-interface=ether2_isp_indihome acton=massquerade