archive

Tag: scripting

11 articles

SCRIPTS scripts

Automatic bypass of hotspot devices based on MAC Address

Recently I was doing some work for a hotel that supplies a ‘Smart TV’ device with Netflix and other functions in every room. These rooms are in turn all connected to a hotspot network and the TV’s all needed to be given internet access. As this was (as sometimes occurs) an unexpected addition to the … Continue reading Automatic bypass of hotspot devices based on MAC Address

SCRIPTS scripts

Scriptlet: Halt MikroTik scheduled scripts if multiple instances are detected.

The following script can be run in terminal (or via any automation tool that can login to your MikroTik devices via SSH) and checks for any duplicate script ‘jobs’ and kills them. I wrote this after noticing a few of my scripts that use fetch would hang periodically and leave multiple jobs open. #kill duplicate … Continue reading Scriptlet: Halt MikroTik scheduled scripts if multiple instances are detected.

SCRIPTS scripts

Scriptlet: Find Default Route Interface Names (and a free licence!)

Today I’m giving you the task of reviewing and improving a small script I’ve written, and one of you will win a free Level 4 RouterOS licence.  Background: I had need of a script to find the interfaces associated with any default routes in order to create matching firewall entries, and it had to work … Continue reading Scriptlet: Find Default Route Interface Names (and a free licence!)

SCRIPTS scripts

MikroTik Scripting: Failover Routing for Asterisk PBX

Hi guys, This is my second article and I wanted to raise the difficulty level of my tutorials! We work a lot with Asterisk PBX and MikroTik and we’ve encountered a problem when we have 2 internet connection with a MikroTik using WAN failover, our Asterisk PBX would stop working when the primary connections fail; … Continue reading MikroTik Scripting: Failover Routing for Asterisk PBX

SCRIPTS scripts

Script Fu – Changing RADIUS server source address

Just a quick post to show an example of day to day usage of RouterOS scripting. Goal: We had to change the src-address for a bunch of radius-server listings across 40 MikroTik devices, to match a new pptp-tunnel address. What would’ve been a pain was that the address is different on each device. Solution: Create … Continue reading Script Fu – Changing RADIUS server source address

MUM mum

MUM-AU 2012 Presentation – Scripting for fun and $profit

My (Andrew Cox) presentation from the MikroTik User Meeting in Sydney is now available online via TikTube.com You can watch it over there or view it embedded here. AU12: Scripting for fun and profit

SCRIPTS scripts

Adding automatic rate limits to user-manager accounts.

This has been mentioned and posted in a couple of places now however I’d like to post a copy here also in the event that anyone else has further suggestions on improvements for the script, or any further questions. Although I don’t use it much myself, many Mikrotik users would be familiar with the “user-manager” … Continue reading Adding automatic rate limits to user-manager accounts.

UNCATEGORIZED Uncategorized

Simple RouterOS http load/bandwidth tester

Disclaimer: I am not responsible for what you choose to do with this script and/or what damage you incur. It uses features of RouterOS in ways I have to assume they were not intended so user beware. I wrote a little script today that allows very simple load/bandwidth testing. Some suggested uses: – basic testing … Continue reading Simple RouterOS http load/bandwidth tester

SCRIPTS scripts

Freebies in SA (or How to download IP address lists to a Mikrotik)

In the state of Australia I currently live in, there are 2 major ISP’s – Internode and Adam Internet. Being a typical nerd and living with other typical nerds we of course have 2 ADSL connections, 1 to each of these providers which are shared out amongst the house. However each of these providers have … Continue reading Freebies in SA (or How to download IP address lists to a Mikrotik)

SCRIPTS scripts

Mikrotik Hotspot Authentication for IPv6 dual-stacked clients

In preparation for some IPv6 testing of our hotspot systems, I’ve come up with the following temporary authentication method for dual-stacked users. Seeing as the login redirect goes via an IPv4 webserver, if enabled IPv6 traffic passes by the hotspot unhindered. This is my work on enabling the IPv6 side of things when a user … Continue reading Mikrotik Hotspot Authentication for IPv6 dual-stacked clients

UNCATEGORIZED Uncategorized

Consultant for hire

I am the user known as omega-00 on the mikrotik forums (see here) and as always am happy to be of assistance in all mikrotik related matters. I can be contacted via the email address listed in my forum profile or alternatively send an email to: admin at this domain dot com (if you can’t … Continue reading Consultant for hire