EzDevInfo.com

mikrotik interview questions

Top mikrotik frequently asked interview questions

MikroTik automated restore-configuration or backup script

I am trying to solve some case on MikroTikOS 5.56. The only thing I need is force MikroTik to automated restore configuration and reset after it. I need a script to handle this:

Automatically restore configuration or backup file without any user interaction. On my mind is script like:

/system backup load name=xx
or
/system reset-configuration run-after-reset=xx

These scripts are always asking for confirmation from user/terminal. I need them to work automatically and cannot solve this...

Thank you for every idea/advice.


Source: (StackOverflow)

Mikrotik - How to add Simple Load Balancing in Mikrotik

I have to WAN connected to mikrotik routerboard, named ppoe-WAN1 and ppoe-WAN2

I want to add simple load balancing to using tow internet connection for all lan users


Source: (StackOverflow)

Advertisements

How to create a new file by Mikrotik routers' scripting [closed]

How to create a new file by script on Mikrotik Routerboard (Router OS 6.30)?


Source: (StackOverflow)

Mikrotik - Using 2 WAN With 2 Static Ip

I have 2 Wan line that connect to internet and one connect to ehter1 and another connect to ehter2 of Mirotik.
ehter3 connect to Lan
Each line has Valid IP (static Ip) and connect with pope connection
WAN1 has 217.219.xx.xx connect with ppoe1-WAN1
WAN 2 has 89.165.xx.xx connect ppoe1-WAN2
in Route ppoe1-WAN1 has Distance 1 and ppoe1-WAN2 has Distance 2

When WAN1 is Disabled I can use 89.165.xx.xx to connect to router from out of office but when WAN1 is enabled I can not connect with 89.165.xx.xx Can any one help me how to fix this problem?


Source: (StackOverflow)

running freeradius on ubuntu 12.04 LTS fails

i am trying to get mikrotik,freeradius and daloradius work together. all this are working but for freeradius.

when i run '~$ sudo service freeradius restart' i get

'jazabilling@jazawifi:~$ sudo service freeradius restart * Stopping FreeRADIUS daemon freeradius
* /var/run/freeradius/freeradius.pid not found... [ OK ] * Starting FreeRADIUS daemon freeradius [fail]

i have tried 'jazabilling@jazawifi:~$ sudo apt-get purge freeradius' but nothing .....so heeeelp!


Source: (StackOverflow)

Mikrotik - How to set routes

I am using Mikrotik as DNS server and main router. I have two DNS records, say x.x.x.1 and x.x.x.2 for mail server mail.xxxx.com and trying to find solution when first server is down and Mikrotik can automatically route it to second server. Could you help me with that.

thanks

H.


Source: (StackOverflow)

PHP Session Destroyed after redirect in CodeIgniter (only in a specific network)

My website has a problem only in a specific network (they used mikrotik to protect their network). The session always destroyed after refresh or redirect, so they can't login to my website. But it only happen on their network, because I try it on several network, it runs perfectly. Please help me.


Source: (StackOverflow)

mikrotik hotspot connect with facebook check in

I want to ask , Is there any way to get mikrotik hotspot get authenticated using Facebook Check in . the thing i actually wanted to make is , User connect to hotspot then in second step a popup screen appear saying Check IN on specified location and then the user is allowed to use internet . is it Possible ?


Source: (StackOverflow)

Mikrotik Switch Commands (Create VLAN, Assign PORTS)

I've been working with a cisco switch and the commands are very simple;

eg/ vlan 100 (will add a vlan called 100)

interface 1/0/1 vlan 100 (will assign the vlan 100 to the port)

It seems mikrotik isn't the same. I don't have a mikrotik switch, but the commands given to me are:

    //add name=vlan200 interface=ether2 vlan-id=200
    //add ports=switch1-cpu, ethernet vlan-id=200 learn=yes

These seem overly complex. Are these the correct commands? Does any Mikrotik guru know where I can test the commands without a switch?


Source: (StackOverflow)

MikroTik Hotspot trial user bandwidth limit

Does anyone know how to limit MikroTik Hotspot trial user bandwidth limit? I need to make a limit (e.g. 10M) for all trial users so they can't use more than 10M together (e.g. 4 trial users together and each can use only 2,5M from 10M, so 10M/trial_users).


Source: (StackOverflow)

Captive portal without internet on Android

Good day. I need Captive Portal on the WiFi hotspot that will work without internet and popup a notification or open a login page automatically. I am using Mikrotik with RouterOS 6.27. I created hotspot and then added a RegExp in DNS like

.* = HOTSPOT_IP_ADDRESS

It works fine in Windows and iOS since their captive portal detection is based on getting the response from some website. Afaik - any response. But for Android it must be some special response, with empty content or status code 204 - I am still not sure.

I tried to emulate google pages which give 204 or empty response and did redirection to my server with this emulation pages but it did not help Android to show notification.

So I need help to make captive portal notification in Android without internet.

Thanks.


Source: (StackOverflow)

How to open default browser from captive on Android

We are developing WiFi authentication solution which should redirect user to the particular page after connection to the WiFi.

On the Android devices we faces with the problem. Once user clicks on the notification into the widget, captive is getting opened and closed immediately and default browser is not getting opened. Can someone advice what is the best way to do it? Or probably it is not even possible to open default browser from the captive directly?

We are using Mikrotik hardware


Source: (StackOverflow)

Edit Mikrotik User Profile With PHP API

I'm building a WiFi authentication tool with user profile edit and guest credentials, etc.

I can write users to the mikrotik and remove users without an issue, but I can't find any documentation on editing the user profile. I suppose I could just remove it and add a new record, but that is just inefficient and may create issues with user keys down the line.

I'm using class.routeros_api.php and I'm on version 6.30

To add a user is done like so...

$response = $api->comm("/tool/user-manager/user/add",array(
    "customer"          => "admin",
    "username"          => "guest_user",
    "location"          => "Guest",
    "first-name"        => "Guest",
    "last-name"         => "1",
    "password"          => "somepw",
    "shared-users"      => "1",
    "copy-from"         => "00:00:00:00:00:00"
));

Deleting a user...

$response = $api->comm("/tool/user-manager/user/remove",array(
    ".id"               => "*15"
));

so I figured editing a user would be something like...

$response = $api->comm("/tool/user-manager/user/edit",array(
    ".id"               => "*15",
    "username"          => "someotheruser",
    "password"          => "someotherpass"
));

However, the error I'm receiving is...

<<< [28] /tool/user-manager/user/edit 
<<< [8] =.id=*14 
<<< [14] =username=someotheruser
<<< [19] =password=someotherpass

>>> [5/5] bytes read. 
>>> [5, 35]!trap 
>>> [26/26] bytes read. 
>>> [26, 8]=message=unknown parameter 
>>> [5/5] bytes read. 
>>> [5, 1]!done

If someone has done this before and can assist with the appropriate syntax for the "/tool/user-manager/user/edit" command, it would be greatly appreciated.


Source: (StackOverflow)

how to use mikrotik-api in android studio

I'm trying to use mikrotik api Java in android, but when i downloaded it and added it in android studio project and used it the app forced to close!

The Mikrotik API On Github: https://github.com/GideonLeGrange/mikrotik-java

imports in the begging of the MainActivity

import me.legrange.mikrotik.MikrotikApiException;
import me.legrange.mikrotik.ApiConnection;
import me.legrange.mikrotik.ResultListener;

my java code to Connect:

ApiConnection con = ApiConnection.connect("10.0.1.1");

This is My Files: http://i.stack.imgur.com/3XYlk.png

thanks.


Source: (StackOverflow)

MikroTik php pear2 api stream_set_blocking() error on windows shared hosting

Getting this error when I try to connect mikrotik router with PHP Pear2 API on shared windows hosting. I don't think I have permission to access php.ini

PHP Warning: stream_set_blocking() has been disabled for security reasons in D:\INETPUB\VHOSTS\mydomain.com\Mikrotek_router\PEAR2\Net\Transmitter\Stream.php on line 190


Source: (StackOverflow)