[Manual Guide] How to Setup Hotspot Feature on Mikrotik Router

What is mikrotik hotspot?


Hotspot feature on the mikrotik router is a system to provide authentication at the user that will use the network. So to get access to the network, the client is required to enter a username and password on the login page is provided. Hotspots are areas where a client or user can connect to the internet through a wireless medium / wireless or wired.


Mikrotik Hotspot Setup Using Winbox


This manual guide show step by step how to setup hotspot mikrotik using winbox and script mikrotik :

1. Enter ip address on interface LAN mikrotik as gatheway. For example 192.168.1.1 (Network Address LAN is 192.168.1.0/24).

Mikrotik Script
/ip address add address=192.168.1.1 netmask=255.255.255.0 interface= ether2 network=192.168.1.0 comment=LAN
2. Set IP Pool or allocation of IP address for hotspot user.

Mikrotik Script :
/ip pool add name=hotspot ranges=192.168.1.2-192.168.1.254
3. Configure DHCP Server on Mikrotik Router.
4. Create Hotspot Server Profile on Mikrotik. On General tab, enter parameters value on text field as shown below :
  • Name of Hotspot Server Profile, default name hsprof1,hsprof2, and etc.
  • Hotspot Address ( Enter IP Address using IP Gatheway LAN)
  • Create DNS Name. Example login.xxx.com
  • Select hotspot on dropdown list at HTML Directory.

Create hotspot server profile on mikrotik hostpot


On the Login tab select HTTP PAP and MAC Cookie on the check box. You can also select HTTP CHAP or HTTPS, or both.

Create hotspot server profile on mikrotik hostpot


5. Create Hotspot Server on mikrotik. Enter parameters value on the text field as shown below :
  • Name of Hotspot Server, default name is server1. But you can change the name according to your taste. For example hotspot1
  • Interface = select on interface LAN
  • Select poll name on drop down list at Address Pool
  • Select name of Hotspot Server Profile on dropdown list at Profile

Create hotspot server on mikrotik hostpot


6. Create Hotspot User Profile on mikrotik. Enter the parameter value on text field as shown below :

Create hotspot user profile on mikrotik hostpot

  • Name of Hotspot User Profile, default name is uprof1. But you can change the name according to your taste. example admin1
  • Select Hotspot option on drop down menu on Address Pool.
  • Value in Shared user is set to default. Shared-Users is used to determine how many users can login with the same username at the same time.
  • Value Idle time out is set none. Idle Time Out is the maximum period for clients hotspot (already authorized / login) that "idle" or no activity. The idle time is calculated when there is no traffic from the client to the hotspot and passing Router. If the idle time has been reached then the client will be disconnected from the router (in the host list will be deleted). For example, when a user is online / login but there is no activity, will then appear logged out idle-timeout on the log Mikrotik.
  • Value Keepalive Timeout is set 2 second. Keep-alive-timeout is the maximum period for checking the hotspot clients reachable or not. for example, if the status of the user is still logged in but already shut down the laptop. If a keep-alive-timeout is reached, the client will be disconnected from the router. will then appear logged out-keep-alive-timeout on the log Mikrotik.
  • Value Status auto Refresh is set 1 second.

7. Create Hotspot User on Mikrotik.

Create hotspot user on mikrotik hostpot

8. Test result

Login page hotspot

Please enter the username and password that was created earlier on mikrotik hotspot login page.


Bypass IP Address and MAC Address on Mikrotik Hotspot

There are several ways you can do to bypass the host in order not to perform authentication when it will enter the hotspot network, as follows :

IP Bindings
Bypass IP and MAC address on mikrotik hotspot can be done with IP Bindings. The following functions of IP Bindings on mikrotik hotspot :
  • Bypass client / host without authentication on the hotspot network based on ip address and mac address.
  • Block access from a particular host based on ip address and mac address.

Configuration example of IP Bindings :

1. Go to IP => hostpot => click IP Bindings tab

configure ip bindings

2. I would like ip address 192.168.1.10 not need authentication on all existing hotspot network at mikrotik router. Please see the picture below is a sample configuration using winbox :

configure ip binding at mikrotik hotspot


Or you can also bypass host based on MAC Address (please see the capture below)

configure mac address ip bindings at mikrotik hotspot


Walled Garden

Walled Garden is used to bypass host to some a particular network resources but still require authentication if you want access to other resources.

Below is an example configuration using walled garden


configure walled garden at mikrotik hotspot

Seen from the picture above, Ip address 192.168.1.10 does not require authentication when accessing to mikrotik-q.blogspot.com, but if access to other websites should perform authentication.

Walled Garden IP List

Walled Garden IP List able to bypass the more specific resource at a certain protocol and port. It can be used to bypass the local server that does not require authentication.

configure walled garden ip list


Advertisment on Mikrotik Hostpot


Advertisment at mikrotik hotspot is used to display popup web page or advertisment for the users/hostpot client who are authenticated on the network hotspot. Advertisment will be displayed based on a specified interval time.

How to configure/setup advertisment on mikrotik hotspot

Go to IP menu => Hotspot => User profiles tab => Select user profile default => select Advertise


configure advertisment at mikrotik hotspot





Enter advertise url on the text field, for example mikrotik-q.blogspot.com and voipclient.blogspot.com. Set the interval time on Advertise Interval text field and set the timeout on Advertise Timeout text field (See the picture above).


Next Article :
I want to share about how to set QoS and bandwidth management and how to install and configure usermanager and how to redirect to website after login page on mikrotik hotspot

1 Response to "[Manual Guide] How to Setup Hotspot Feature on Mikrotik Router"

Shailendra Yadav said...

Make one more article on Hot spot advertisement via login page. There are some variables and files to handle advertisement.