Syed Jahanzaib Personal Blog to Share Knowledge !

October 28, 2011

Webmin / PHP base Mikrotik Control Panel

Filed under: Mikrotik Related — Tags: , , , , , — Syed Jahanzaib / Pinochio~:) @ 12:31 PM

Following are two good .simple and basic ways to control your Mikrotik Box via your browser as fronted using WEBMIN or PHP base pane at backend. Both are good in there own ways.

Easy to setup and quick to manage , using these method, you don’t have to login via winbox to access your mikrotik for basic management :)~
Just install them on any Linux base system, it can be your proxy or whatever Linux base pc on LAN you have.


Simply install WEBMIN from and then follow the guide below.

[By Mr. Mudassir Mirza @

Snapshot of webmin configured with the mikrotik scripts functions.

(My Modified, for my personnel reference,
idea was taken from  Mr. Mudassir Mirza @

# set -x
# for (( ; ; ))
# do
rm -fr $FPATH/$DRL.txt
ssh $USER@$MTIP -p $PORT / ppp active print file=$DRL
scp -P 22 $USER@$MTIP:$DRL.txt $FPATH/$DRL.txt
sed -i 's/MEJM-BFQK/secret/g' /zaib/zaib.txt
cat $FPATH/$DRL.txt
TTL=`cat $FPATH/$DRL.txt |sed '1,5d' | wc -l`
echo -e "\t\t\n Total Number of Active Users $TTL"


Snapshot of PHP panel configured with the mikrotik scripts functions.

[By Mr. Mudassir Mirza @

You must have LAMP base installation on your nix box. then follow the below guide.
[Note: it have some minor bugs, For example, when you tri to import mysql db via using manual command

mysql#\. /var/www/mtpanel/mtpanel.sql;

You may get following error.

Failed to open file '/var/www/mtpanel/mtpanel.sql;', error: 2

Use the following command instead.

mysql -u root -p123 --database mtpanel < mtpanel.sql

There is also an bug in live monitoring of specific user page, that can be corrected by editing it and remove refresh interval.

Warning: This page is accessible by every user, To password protect it, use the following guide to protect it with password.

You can also remove some of its funcitons, for example i provided this panel for support personnel which have only specific functions available, Live Monitoring , Connected Users, Password Change.

Some information and instructions regarding this panel is well described and discussed at following links


  1. nice share sir… keep post


    Comment by Tohirin — October 29, 2011 @ 6:17 PM

  2. Please Help Me, I want to try this. But When I m Selecting Any Option and Press Go It’s Give me an error on URL

    http://MY-IP /mtpanel/%3Cbr%20/%3E%3Cb%3ENotice%3C/b%3E:%20%20Undefined%20index:%20self%20in%20%3Cb%3EC:/xampp/htdocs/mtpanel/index.php%3C/b%3E%20on%20line%20%3Cb%3E6%3C/b%3E%3Cbr%20/%3E


    Comment by xbnbd — November 18, 2012 @ 8:19 PM

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: