image_pdfimage_print

This cookbook will provide the integration guide to make mikrotik platform work with kiwire system.

The guide are provided using the Mikrotik Winbox program as an interface with the RouterOS. The Winbox program can be obtained from the MikroTik website – http://www.mikrotik.com/download)

Basic Router Setup

Before you follow the instructions in this guide it’s important that you decide which port you will assign the role of WAN, and whether you plan to use the inbuilt WiFi for the hotspot or one of the LAN ports in conjunction with additional APs

WAN
The WAN port is where you connect the MikroTik to your existing router, for our guide we use Ethernet port 1 on the router –
Click on
IP > DHCP Client
Click on the “+” and enter the below setting

mikrotik_wan

Select the interface you want to be the WAN port.

mikrotik_wan2

Click “OK
mikrotik_wan3

Time Setup

Click on System > NTP Client. Enter primary and secondary NTP servers. To find NTP servers, go to http://www.pool.ntp.org/ and select the location’s continent on the right side of the page. You’ll find NTP servers there.

Be sure to leave TimeZoneName: manual, and TimeZone: 00:00 in System > Clock. (Don’t set your own timezone, because the router has to show the GMT time!)

NAS ID

You need to change the router’s NASID. The NASID setting in the Mikrotik is located under System > Identity. Default is ‘MikroTik’.

Login Redirect

To enable the mikrotik Hotspot to redirect the user traffic to kiwire , please upload the 2 files bellow into the Hotspot folder in mikrotik. This folder can be access by using the files function and drag and drop the 2 files into it.

mikrotik_file

 

IP DHCP via RADIUS

To enable dhcp server assignment to users using the kiwire policy dhcp profile , you are require to configure Mikrotik DHCP to use Radius as its primary source of lease control . the step involved are :

dhcp_mik1

 

 

 

 

 

 

 

 

 

 

  1. Make sure “Use RADIUS” is checked in the setting for the DHCP server under

IP-> DHCP SERVER

dhcp_mik2

 

 

 

 

 

 

 

 

 

2 . Make sure Radius server setting DHCP is checked. under “RADIUS”

Wallgarden/Whitelist for Mikrotik

In the IP > Hotspot menu, it is necessary to open the Walled Garden tab and specify which sites the end-user will be able to visit without being authenticated.
It is mandatory to add the Welcome Portal URL into this list (see Mikrotik), otherwise the end-user will not be able to visit the authentication page. Furthermore, you must allow the following Dst. Host values:

mikrotik_walled_garden

Use DNS instead of ip for hotspot login

  1. Click on the ip->DNS then enter the mikrotik ip address in the server
    Eg: Mikrotik ip address:192.168.0.8 , Kiwire ip address: 192.168.2.201dns
  2. Click on the static button , Enter a hostname then bind with kiwire ip address. dns1
  3. Click on DHCP Server .Select Network tab and add Domain  Every DHCP network will be assign with a different Domaindhcp (1)
  4. Edit login.html as belowlogin

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 “192.168.0.202” with your kiwire server ip.

mik_schedule