MikroTik Configuration (WinBox)

MikroTik Configuration (WinBox)

From WirelessOrbit

Jump to: navigation, search

This guide will walk you through setting up MikroTik RouterOS to work with Wireless Orbit. If you need information on installing or upgrading a MikroTik router, please consult the external links section of the MikroTik page of this wiki.

This guide assumes you're using MikroTik's WinBox interface to configure the router. The same configuration options apply if you're using the command line interface, although individual steps will be a little different.

Contents

Hotspot Setup

MikroTik Hotspot Configuration

After logging into the router via WinBox, click on IP and then Hotspot to get to the Hotspot Setup dialog box. From there go through the basic hotspot configuration. This involves setting up the IP addresses and interfaces used by the router. Consult the MikroTik RouterOS documentation for details about this part of the configuration.

When you're done, you should see something like the image to the right. From the Hotspot window:

  • Click on the Profiles button
  • Double click on hsprof1
MikroTik Hotspot Profile
  • Check/enable the Use RADIUS checkbox
  • Check/enable the Accounting checkbox
  • Uncheck/disable the Interim Update checkbox
  • Click on the Login tab
  • Check/enable the HTTP PAP checkbox
  • Click on General tab
  • Check/enable the Hotspot Address checkbox and enter the LAN IP of the gateway
  • Check/enable the DNS Name checkbox and enter the full host name of the gateway
  • From the HTML Directory pulldown select "hotspot"
  • Click on the OK button along the right side of the window

User Profile Configuration

MikroTik Hotspot User Profile Configuration

If you're following along, clicking OK should have taken you back to the Hotspot Server Profiles window. From there close that window and you'll be back at the Hotspot window. If you're not there, get there. From the Hotspot window:

  • Click on the Users tab
  • Click on the Profiles button
  • Remove any profiles other than default by selecting them and clicking on the - (minus sign) at the top of the window
  • Double click on the default profile
  • Disable/uncheck the Session Timeout checkbox
  • Make sure there is nothing selected in the Idle Timeout pulldown
  • Make sure there is nothing selected in the Keepalive Timeout pulldown
  • Click on the OK button along the right side of the window

Walled Garden Configuration

If you're following along, clicking OK should have taken you back to the Hotspot User Profiles window. From there close that window and you'll be back at the Hotspot window. If you're not there, get there. From the Hotspot window:

  • Click on the Walled Garden tab
  • Click on the + (plus sign) button
  • In the Action radio buttons, select Allow
  • In the Server pulldown, select "hotspot1"
  • In the Dst. Host blank enter "*.wirelessorbit.com"
  • In the "Dst. Port" blank enter "443"
  • In a similar fashion, add the hostnames of any payment gateways you're using
  • Click on the OK button along the right side of the window

RADIUS Configuration

If you're following along, clicking OK should have taken you back to the Hotspot window. From there, select RADIUS from the left hand side of the screen. From the Radius window:

  • Click on the + (plus sign) button
  • Check/enable the Hotspot checkbox
  • Uncheck/disable all the other service type checkboxes
  • In the Address blank enter "69.36.234.20"
  • In the Secret blank enter the secret key you defined in the RADIUS profile for this gateway (in the Wireless Orbit Control Center). If you're not sure what that is, just check the gateway details in the Gateways page of the Control Center.
  • In the Authentication Port blank enter "1812"
  • In the Accounting Port blank enter "1813"
  • Click OK

Login Page Configuration

The captive portal interface of your MikroTik router has to be redirected to Wireless Orbit's hosted login portal. In order to do that, you'll need to upload a simple redirection page to your router. To do this, connect to your router with an FTP client and place the following file in the hotspot subdirectory. Details of how to do this are given in the MikroTik documentation.

The redirection page is:

<HTML>
<TITLE>Login</TITLE>
<BODY>
<FORM NAME="redirect" METHOD="post"
       ACTION="https://portal.wirelessorbit.com/portal/index.php?portal_id=ID">
       <INPUT TYPE="hidden" NAME="mac" VALUE="$(mac)"/>
       <INPUT TYPE="hidden" NAME="hostname" VALUE="$(hostname)"/>
       <INPUT TYPE="hidden" NAME="ip" VALUE="$(ip)"/>
       <INPUT TYPE="hidden" NAME="user" 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)"/>
</FORM>
<SCRIPT LANGUAGE="JavaScript">
        document.redirect.submit();
</SCRIPT>
</BODY>
</HTML>

You can either cut and paste this to a file and upload it, or download mikrotik_login.zip, unzip the archive, and upload the HTML document inside.

You need to edit this file and replace the text ID in the form action with the portal ID for gateway. The portal ID is listed on the gateway details area in the Gateways page of the Control Center.