Tag Archive: Mikrotik


To upgrade a Miktorik’s firmware, its fairly easy. Put in the file, and reboot it. But there isn’t an way to schedule a reboot.

 

I have made a script to make it easy.

View full article »

Now that we have lots of 4G dongles providing clients a failover when their ADSL dies (crappy copper means when not if) We need to monitor the status of the routes.

For this to work you need to do a few things first.

View full article »

I needed a way of resolving DNS Names to IPs to use in firewall rules.

 

/ip firewall address-list
add address=216.58.220.100 comment=www.google.com list=dns_list
add address=1.2.3.4 comment=www.website1.com list=dns_list
add address=157.56.242.98 comment=outlook.com list=dns_list

 

/system scheduler
add interval=9m1s name=DNSLookup on-event=DNSLookupScrip policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=\
jan/01/1970 start-time=00:00:01

/system script
add name=DNSLookupScrip policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive source=”:foreach \
dnsitems in=[ /ip firewall address-list find where list=\”dns_list\” ] do={\
\r\
\n /ip firewall address-list set \$dnsitems address=[:resolve [/ip firewall \
address-list get \$dnsitems comment]];\r\
\n};”

OR

:foreach dnsitems in=[ /ip firewall address-list find where list=”dns_list” ] do={
/ip firewall address-list set $dnsitems address=[:resolve [/ip firewall address-list get $dnsitems comment]];
};