Mikrotik Local Bandwidth Management System, Using Mikrotik API
This software is for a local bandwidth management system using the Mikrotik API. Bandwidth management is targeted for each IP address obtained from Mikrotik DHCP, using a simple queue method.
- Generate Firewall filter rule.
- Make package for client (category for package : Premium, Regular, Kuota).
- Make client using simple queue method.
- Bandwidth management.
- Client usage graph.
- Reboot Mikrotik.
If you want to use this software, the requirements :
- Web Server
- Operating System (Linux is Recomended).
- PHP version >= 7.4.
- Apache web server or similar.
- Enable htaccess.
- MySQL DBMS.
- Mikrotik Router board
- Clock speed CPU 650 MHz.
- Router OS v6.3.
- Enable API port.
For instalation follow this :
- Get ANMIK master. You can get the master file with :
- Download ANMIK master package ANMIK then extract at web server folder or
- Open terminal in your web server directory then clone this repository with :
git clone https://github.com/ahmadafif-codaff/anmik.git
- Edit file example.config.php in "app/config" folder, fill in the DB_HOST, DB_USER, DB_PASSWORD according to your DBMS, and fill in MIKROTIK_HOST, MIKROTIK_USER, MIKROTIK_PASSWORD according to your Mikrotik Router, then save the change and rename file example.config.php to config.php.
- Make database "anmik" then import database anmik.sql from "db" folder. If you are using a Linux server, change "DB Folder" to full access with command "chmod 777 -R db" (This is used for the purpose of creating, modifying and checking data in the "usage.json" file in the "db" folder).
- Open the web browser, then follow links http://localhost/anmik/autoinput ("anmik" change to directory where you place master file). Every time your PC restart run this link (make the link is autorun is recomended).
If the web server has been installed correctly, then :
-
Open the web browser then follow links http://localhost/anmik/login ("anmik" change to directory where you place master file). You will be directed to the login page.
-
Login to ANMIK using username : anmik, and password : Anmik123. If login correctly you will be directed to the dashboard page.
- On the ANMIK web server, click the ip/dhcp-lease menu and all connected client routers will be displayed. (Please note that the connected client router must be connected to the Mikrotik router in router hotspot mode and by getting the IP dynamically. This is used to find out which routers are on and off).
- Still on the ip/dhcp page, if youre router client get IP dynamically (marked with a yellow background), click button check, then status will be changed to static ip (marked with a white background). This is used to prevent the IP address from being used by other client routers.
- Then move to the firewall page by clicking ip/firewall menu, click generate firewall button to quickly create the firewall. This is used to block internet access for unauthorized IP addresses.
Update on firewall : You can see the client using the IP in the firewall list
- Open the package page and make a package according to what will be used.
- Make client with clicking client menu, then create a client according to the client router IP and the package the client will use. When you first create a client, the system will direct you to create a client with the name Root Simple Queue, just change the date and package, then click OK, the root client will not be recorded in the ANMIK application, but will only be recorded in the Simple Queue in MIKROTIK.
If remote management on your client router is active, then you can do it remotely by simply clicking on the IP address that is in the client list or dhcp lease list
- Go to the schedule reboot page to make the router reboot on a scheduled basis. This schedule is divided into 2 types, namely day and hour.
- On the schedule boost page, it is used to create a predetermined client speed increase schedule. This schedule is divided into 2 types, namely repeat and one time.
- Press the Mikrotik reboot menu button to reboot the Mikrotik from the web server.
- Click the logging menu button to display the activity log. Here all activities will be shown, both data changes made by the admin or from the server itself.
2.1.0 Your customers can see the selected packages and can see their quota usage.
-
Open the web browser then follow links http://localhost/anmik/login_client ("anmik" change to directory where you place master file). You will be directed to the login page.
-
To log in to the client, use the client name as the username and the target IP as the password.
- Then, if login correctly you will be directed to the client dashboard page.