Device configuration : Mikrotik

Open Winbox application to access Mikrotik or you may use a web browser to connect to your Mikrotik. Connect to Mikrotik using it’s IP address or MAC address if you are using Winbox.

To start setting up the hotspot network, click on IP-Hotspot and click on Hotspot Setup under Servers tab. Go through the Hotspot Wizard by selecting the desired interface to run the hotspot network.

Create a gateway for your hotspot network and masquerade the network.

Create a DHCP pool range for your hotspot network.

Select none for SSL Certificate.

Leave the SMTP server address as default

Add Google DNS Servers and

Leave the DNS name empty.

Skip the local hotspot user by clicking next.

Now you have successfully created a hotspot network on your Mikrotik. The next step is to point your hotspot network to RADIUS server which is Kiwire. To do that, first, click on the Server Profiles tab and select the hotspot server profile that you just created. Go to the Login tab and tick only HTTP PAP and HTTPS.

Next, go to RADIUS tab and tick on use RADIUS.

Next, go to User Profiles tab and click on the default profile. Edit the Shared Users box by putting 1000.

Go to Walled Garden, add new Walled Garden at the Dst. Host section, select your hotspot server and allow it on the Action. This setting is for allowing the social login and pre-login campaign videos or URLs.
Type Walled Garden List

Synchroweb social gate
Facebook Login *facebook*
Wechat Login **
Twitter Login *twitter*
Instagram *Instagram*
Google+ *google*


Next, go to Walled Garden IP List and add Kiwire IP address in the Src. Address and Dst. Address and select your hotspot server.

Click on the RADIUS menu and add new RADIUS. Put Kiwire IP address and create a secret. Tick on hotspot for Service.

On the Incoming tab in the RADIUS menu, tick on Accept and use port 3799.

Next, go to System-Identity and set an identity for your Mikrotik. This will be the NAS ID of your Mikrotik.

Next, go to Files, copy below login.html into the existing login.html and edit the url part as http://kiwire-ip/user/index.php. For example,




$(if chap-id)


<center><b>JavaScript required. Enable JavaScript to continue.</b></center>



<center>If you are not redirected in a few seconds, click 'continue' below<br>

<form name="redirect" action="" method="post">

<input type="hidden" name="mac" value="$(mac)">

<input type="hidden" name="ip" value="$(ip)">

<input type="hidden" name="username" value="$(username)">

<input type="hidden" name="link-login" value="$(link-login)">

<input type="hidden" name="link-orig" value="$(link-orig)">

<input type="hidden" name="error" value="$(error)">

<input type="hidden" name="chap-id" value="$(chap-id)">

<input type="hidden" name="chap-challenge" value="$(chap-challenge)">

<input type="hidden" name="link-login-only" value="$(link-login-only)">

<input type="hidden" name="link-orig-esc" value="$(link-orig-esc)">

<input type="hidden" name="mac-esc" value="$(mac-esc)">

<input type="hidden" name="nasid" value="$(identity)" />

<input type="hidden" name="vlan" value="$(interface-name)" />

<input type="submit" value="continue">


<script language="JavaScript">










Open your web browser and type in http://kiwire-ip/admin to access your Kiwire admin panel.

Go to Device-NAS and click add NAS to add your Mikrotik.

  • Device type is Mikrotik
  • NAS ID is your Mikrotik identity
  • IP address is your Mikrotik IP address
  • Shared Secret Key is your Mikrotik RADIUS secret
  • COA Port is Mikrotik Incoming port 3799
  • NAS username and password is your Mikrotik username and password
  • Address is your Mikrotik location
  • Description is remark of your Mikrotik

Next, we go to Device-Zone to assign which zone we want to assign splash page. We can assign zone based on NAS ID, VLAN ID, IP address, or SSID. Create a new zone by clicking Create Zone. Put a name to it, Link To User and Limit Connected User can be empty. Then enable the Status.

After that, edit the zone by clicking Add.

Finally, you have completed the configuration of both Kiwire and Mikrotik. Next is you need to design a landing page, create user profile and create user and assign the landing page to the zone desired. You may refer to for setting up landing page, user profile, users, and other details of Kiwire.


Setup rate limit / bandwidth control for Mikrotik PPPOE

Kiwire can also support dialup pppoe services for Mikrotik as controller, with Mikrotik as PPPOE server is an popular option for fixed fiber or wifi always on internet services for telco or internet service provider .

One of the requirement is to provide bandwidth or rate limit to the subscriber , the default profile by Kiwire is for WISPr ( Wireless ISP ) which use Wispr attribute , however you can use policy-> radius attribute to add PPPOE rate limit attribute to the profile. the step are

    1. create a profile as usual for your subscriber
    2. Access Radius attribute editor by going to Policy-> Radius Attribute
    3. Add the attribute “Mikrotik-Rate-Limit” ,select “:=” as operator and value in K or MB as you desire in upload/download format as the screenshot.


Schedule script

The schedule script will enable automatic download of wallgarden list and firewall list into the mikrotik nas on an interval.


  1. Login to winbox
  2. Go to System > Scheduler and add a new task by pressing the plus sign.
  3. Under the field Name type “firewall”
  4. set the Interval to 01:00:00 
  5. Paste the following text into it, replace the ip of “” with your kiwire server ip.