91. Mikrotik Failover for Specific IP Pool




You can contact me: plus.google.com/+PhallaCCMT; youtube.com/phallaccmt; facebook.com/Phalla.CCMT; twitter.com/PhallaCCMT and Phalla.CCMT@gmail.com

Script:

/ip address
add address=192.168.168.1/24 interface=bridge-LAN network=192.168.168.0
add address=103.28.0.254/30 interface=ether2-WAN2-3972 network=103.28.0.252
add address=103.28.2.254/30 interface=ether1-WAN1-3971 network=103.28.2.252
add address=10.5.50.1/24 interface=wlan1-4Test network=10.5.50.0

/ip pool
add name=LAN ranges=192.168.168.100-192.168.168.250
add name=wifi ranges=10.5.50.2-10.5.50.254

/ip dhcp-server
add address-pool=LAN disabled=no interface=bridge-LAN lease-time=3d name=server-LAN
add address-pool=wifi disabled=no interface=wlan1-4Test lease-time=1h name=server-Wifi
/ip dhcp-server network
add address=10.5.50.0/24 comment="hotspot network" gateway=10.5.50.1
add address=192.168.168.0/24 dns-server=192.168.168.1,103.28.3.187,8.8.8.8 gateway=192.168.168.1

/ip dns
set allow-remote-requests=yes cache-size=5000KiB max-udp-packet-size=512 servers=8.8.8.8,103.28.3.187,8.8.4.4

/ip firewall mangle
add action=mark-routing chain=prerouting comment=LAN1GoWAN2 disabled=yes new-routing-mark=LAN1ToWAN2 passthrough=yes src-address=192.168.168.0/24

/ip firewall nat
add action=masquerade chain=srcnat

/ip route
add distance=3 gateway=103.28.0.253 routing-mark=LAN1ToWAN2
add distance=1 gateway=103.28.2.253

/tool netwatch
add down-script="/ip firewall mangle enable [find where comment =LAN1GoWAN2] " host=103.28.2.253 interval=10s timeout=100ms up-script="/ip firewall mangle disable [find where comment =LAN1GoWAN2] "


Previous
Next Post »

4 comments

Write comments
Unknown
AUTHOR
January 6, 2017 at 1:35 PM delete

Hi bro, could you make the load balancing please? thanks in advance.

Reply
avatar
mysocialblog
AUTHOR
October 22, 2018 at 4:26 PM delete

Is this another day away from work? It seems ideal. It could be therapeutic. Yet, there's that little voice inside my head that's badgering the equilibrium of the harmonic sounds I actually prefer to hear. Dissonance and discord!
ip booter

Reply
avatar
Jennet
AUTHOR
March 15, 2019 at 9:23 PM delete

Assortment: Above-grounds come in a few sizes and shapes, and a scope of brightening divider designs and decking decisions. pool maintenance guide

Reply
avatar
Robert Beauty
AUTHOR
September 10, 2020 at 2:34 AM delete This comment has been removed by the author.
avatar