Community discussions

MikroTik App
 
hegnor
just joined
Topic Author
Posts: 8
Joined: Fri Feb 15, 2013 11:49 pm

Website to start and stop scripts...

Sat Mar 21, 2015 6:14 pm

Hello,

Is it possible and create a website on mikcrotik router that you can log in and and run script in a simple way so even grandma can do it.

scripts are done so need a link between the script and website if this is possible?

thanks for your reply and help;)
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Website to start and stop scripts...

Sat Mar 21, 2015 6:39 pm

IMHO, if the scripts are already made, it's not at all difficult to use WebFig, and go to the "System > Script" menu to run them.

But if you want something sleeker... On the router itself, there are two ways:
1. Reverse engineer WebFig, then after creating a hotspot (to serve as the entry point), customize the hotspot page with the reversed engineered WebFig.

Pro:
Less taxing on the router (compared to the other method)
Con:
Difficult to pull off, very error prone, and unstable across version changes.

2. Install a Linux on a KVM/MetaRouter virtual machine, and create a web application that will use the API protocol to connect to the real machine, and invoke the desired script (or whatever else you might want to customize...).

Pro:
Not so error prone (in that it's easier to detect errors), easier to make the app... Once you set up the VM (which is the difficult part).
Con:
Very taxing on the router, particularly with RAM. You need enough to run the router + enough to run the VM + enough for its web server and whatever else you may need on the VM.


If you can live with the web application not being on the router itself, there's also a 3rd way: An API application (same as approach 2), but on a separate, real machine. This is least taxing on the router, but it means there needs to be internet connectivity for your web interface to work.