Last active
October 7, 2023 14:48
-
-
Save foxycode/198bc5610f8f4a3a84b72450b87ba928 to your computer and use it in GitHub Desktop.
MikroTik backup link over LTE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ip firewall filter | |
add action=drop chain=output comment="drop pings to 8.8.8.8 if they go through LTE" \ | |
dst-address=8.8.8.8 out-interface=lte1 protocol=icmp | |
/ip firewall nat | |
add action=masquerade chain=srcnat src-address=192.168.1.0/24 comment=ISP1 | |
add action=masquerade chain=srcnat src-address=192.168.1.0/24 out-interface=lte1 disabled=yes comment=LTE | |
/system script | |
add name=ISP1up owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\ | |
"/ip firewall nat set [find comment=\ISP1\"] disabled=no\r\ | |
\n/ip firewall nat set [find comment=\"LTE\"] disabled=yes\r\ | |
\n/log error \"ISP1 is up\"" | |
add name=ISP1down owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\ | |
"/ip firewall nat set [find comment=\"ISP1\"] disabled=yes\r\ | |
\n/ip firewall nat set [find comment=\"LTE\"] disabled=no\r\ | |
\n/log error \"ISP1 is down\"" | |
/tool netwatch | |
add down-script=ISP1down host=8.8.8.8 interval=5s timeout=2s up-script=ISP1up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment