Skip to content

freemann350/MikroKontrol

Repository files navigation

MikroKontrol - Simple RouterOS SDN Controller

Mikrotik Logo

A simple Laravel WebUI for controling devices using RouterOS via their REST API.

Main template is Star Admin 2 by BootstrapDash

Login is based on Finance Mobile Application-UX/UI Design Screen One login page (slight background changes)

Interface

imagem imagem imagem imagem imagem imagem

Features:

  • View device interfaces (Physical/Virtual/WiFi)

  • Bridge configuration

  • Security Profile & WiFi configuration

  • Address configuration

  • Configuration for an assortment of services

    • DHCP

    • DNS

    • Wireguard

Modules used:

Notes:

  • The app contains little to no JS (save for a few usability plugins), so it is extremely server-side, expect delays on endpoint communication

  • The configuration provided is very simple, but direct JSON requests can be used on the Creation/Edition endpoints using the <textarea> elements on said pages

Deployment (for testing)

This deployment is for Debian 12/Debian based systems and uses Laravel Sail for a containerized Web & MySQL Servers

  1. Docker

Install Docker Engine for use with Laravel Sail

apt update
apt install -y ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc

echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update

apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  • Add your user to the Docker group
usermod -aG docker <YOUR_USER>
  1. PHP & Composer
  • Install all required PHP packages and download Composer
apt install -y php php-fpm php-curl php-gd php-dom php-xml php-zip zip unzip

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
  • !!! From this point onward, do not use root !!!
  1. Repository
  • Download this repository
git clone https://github.com/freemann350/MikroKontrol
  1. Laravel Sail
  • Install with composer the laravel/sail package
composer require laravel/sail --dev
  • Install Laravel Sail using artisan (select mysql)
php artisan sail:install 
  • (Optional) Add ./vendor/bin/sail alias to .bashrc
echo "alias sail='./vendor/bin/sail'" >> $HOME/.bashrc
  • Start the containers
sail up -d
  • Make the DB migrations and data seeding
sail artisan migrate
sail artisan db:seed
  1. Possible permission errors
  • If there is any sort of permission problem, try running the chown command using root (alter the variables below to your user and folder)
chown -R <YOUR_USER> <MikroKontroller_FOLDER>

Everything should up and running now. The credentials are as follows:

Admin default account: admin@example.com

  • Contains one device, Default_Device (admin:123456) via http://192.168.88.1

User default account: user@example.com

All passwords are password

About

Simple RouterOS SDN Controller

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published