Skip to main content

Hotspot Setup on Mikrotik RouterBoard

Hotspot Setup on Mikrotik RouterBoard



There guides 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

RouterOS: login

 Start by logging into your Mikrotik device.


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 settings:



Select the interface you want to be the WAN port.



Click "OK"





Hotspot Setup 

RouterOS: Radius set up
Click on Radius on the left menu


RouterOS: Radius+
then in the Radius dialoge box, click on the "+" enter the below settings:
  • Service: Hotspot
  • Address: *insert radius_server_ip here*
  • Secret: *insert radius_secret here*
  • Authentication Port: 1812
  • Accounting Port: 1813

RouterOS: Radius


Press OK to Save


On Radius window, click on the "+" again, and enter the following settings:
  • Service: Hotspot
  • Address: *insert radius_server2_ip here*
  • Secret: *insert radius_secret here*
  • Authentication Port: 1812
  • Accounting Port: 1813

    Press OK to Save


RouterOS: IP-hotspot

Click on IP > Hotspot on the left menu and then Hotspot Setup to start the Hotspot set up 'wizard' and configure with the below settings:

RouterOS: Hotspot Wiward


  • Hotspot InterfaceThis should be the interface your guest users connect through, such as the Wireless/WLAN interface, or an Ethernet port that is connected to an access point or switch. For the remainder of this guide we user Ethernet port 5 as the hotspot interface, please use WLAN interface if you plan to apply this to the Wi-Fi of the router. Click "Next"
  • Local Address of Network: 10.1.0.1/24
    Click "Next"
  • Masquerade Network: Ticked
    Click "Next"
  • Address Pool of Network: 10.1.0.2-10.1.0.254
    Click "Next"
  • Select Certificate: None
    Click "Next"
  • IP Address of SMTP Serverleave at default
    Click "Next"
  • DNS Servers: 208.67.222.222 and 208.67.220.220
    Click "Next"
  • DNS NameLeave blank
    Click "Next"

  • Click "OK" to Complete


In the Hotspot Window, on the Server tab, double-click the hotspot you've just created to load the Hotspot Server Window



Change the Name to the MAC address of your Mikrotik as printed on the bottom of the device.
This is the first MAC address on the label. If you cannot find it, go to "Interfaces" on the left ment and then click on "ether1-gateway" and use the MAC listed there.
Note the format of the MAC should be as shown, i.e.: AA-BB-CC-DD-EE-FF (all capitals with hyphens between each two digits)


RouterOS: Hotspot




Supplemental WLAN Set up details:
If you chose WLAN for your hotspot during your setup the Interface on Hotspot Server above will say WLAN for yourInterface. You will now need to enable the SSID you intend to use:
On the left hand menu, click on "Wireless" and on the Wireless Tables window press the Tick icon to enable the WiFi. 

RouterOS: Wireless Tables


To define the SSID double-click on the wlan1 entry in this view and click on the Wireless tab

RouterOS: Wireless Interface

Change the SSID field to one of your choosing.



Hotspot Server Profile Settings:

Returning to setting up the Hotspot service setup: on the Hotspot Window, (IP > Hotspot) click on the Server ProfilesTab.and double-click on the newly created Profile

RouterOS: Server Profiles


On the Hotspot Server Profile dialogue window; set the following:

On the General tab:
  • Hotspot Address: 10.1.0.1

RouterOS: Server Profile - general


On the Login tab:
  • HTTP PAP: Ticked
  • All others: Unticked

RouterOS: Server Profile - login


On the RADIUS tab:
  • Use RADIUS: Ticked
  • MAC Format: XX-XX-XX-XX-XX-XX
  • Accounting: Ticked
  • Interim Update: 00:15:00

RouterOS: Server Profile - radius


Click "OK" to Save


On the Hotspot Window click on User Profiles and double click on the default entry. 
Set the following:
  • Session Timeout: 24:00:00
  • Idle Timeout: 00:30:00
  • Keepalive Timeout: blank (click the up arrow to wipe the value)



Click "OK" to Save



Setting Up the Wall Garden:

On the main Winbox interface, click New Terminal to open the Terminal Window



  • Copy the following text: 

/ip hotspot walled-garden
add dst-host=*insert access_domain here*
add dst-host=*facebook*
add dst-host=*linkedin*
add dst-host=*twitter*
add dst-host=*fbcdn*
add dst-host=*akamai*
add dst-host=*licdn*
add dst-host=*twimg*
add dst-host=*cloudfront*
add dst-host=*google-analytics*
add dst-host=*www.google*
add dst-host=*googleusercontent*
add dst-host=*googleapis*
add dst-host=*gstatic*
add dst-host=*instagram*
add dst-host=*venuewifi*
add dst-host=*openweathermap*

  • and Paste this into the Terminal Window (press Control+Shift+Insert on your keyboard)


  • Close the Terminal Window.

This will create the Wall Garden settings; this can be reviewed from the main Winbox interface, click IP, then Hotspot and selecting the Wall Garden tab:




Creating the Login Journey Parameters:

 The final step is to upload two files to the router which handle the redirection to your customised splash page.
  • Click on "Files" on the left menu.

 RouterOS: Server Profile - radius


  •  Save the two HTML files below
  •  Drag and drop the two .html files you downloaded in to the "hotspot" folder in the File List window.

 *insert mikrotik_files here*

Comments

Popular Posts