MikroTik Configuration (Command Line)

MikroTik Configuration (Command Line)

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 the command line to configure your router. If you're using the MikroTik WinBox interface consult the MikroTik Configuration (WinBox) guide elsewhere in this wiki.

This guide was written for MikroTik RouterOS 2.9.x. Other versions should be similar but individual details may vary.

Contents

Setup

Run the setup command to do the basic configuration of the router:

[admin@MikroTik] > /setup

Consult the MikroTik RouterOS manual for additional information.

Hotspot Profile

Create the hotspot profile:

[admin@MikroTik] > /ip hotspot profile add name="hsprof1" hotspot-address=IPADDR dns-name="HOSTNAME" html-directory=hotspot login-by=http-pap use-radius=yes radius-accounting=yes

...where IPADDR is the address of the interface you defined for the wireless interface in the Setup step (above), and HOSTNAME is whatever the hostname of the router is.

Hotspot

Create the hotspot configuration and enable it.

[admin@MikroTik] > /ip hotspot add name="hotspot1" interface=IFACE address-pool=dhcp-pool-1 profile=hsprof1
[admin@MikroTik] > /ip hotspot print 
Flags: X - disabled, I - invalid, S - HTTPS 
 #   NAME                           INTERFACE ADDRESS-POOL PROFILE IDLE-TIMEOUT
 0 X hotspot1                       IFACE    dhcp-pool-1  hsprof1 5m
[admin@MikroTik] > /ip hotspot enable 0

...where IFACE is the interface you're planning on using for your wireless network. If you have other hotspot configurations defined, they'll show up in the ip hotspot print listing. You just want to find the number of the new config and use it in the ip hotspot enable command.

Walled garden

Add hosts to the walled garden:

[admin@MikroTik] > /ip hotspot walled-garden ip add server=hotspot1 protocol=tcp dst-host="portal.wirelessorbit.com" dst-port=443 action=accept

Add any additional walled garden hosts required by any payment gateways you're using.

RADIUS

Add the RADIUS servers:

[admin@MikroTik] > /radius add address=69.36.234.20 secret="SECRET_KEY" authentication-port=1812 accounting-port=1813

...where SECRET_KEY is 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.

Login Page Configuration

See the Login Page Configuration section of the MikroTik Configuration (WinBox) page.