Site icon System Zone

MikroTik Hotspot with Data Limit and Prepaid Billing System

If you are a network administrator and want to establish a network that will have data limitation package with prepaid billing system, MikroTik Hotspot Server with MikroTik User Manager Radius Server will be your best solution. Because, MikroTik User Manager is a poplar Radius application that will give facility to manage user data package as well as prepaid billing system efficiently. On the other hand, MikroTik Hotspot is a popular service that will help to connect your network user without any hassle.

So, it is time to know about MikroTik Hotspot Configuration with User Manager Radius Server and this article will guide you how to configure a Hotspot Server with User Manager Radius Server that will have Data Limit and Prepaid Billing System facility.

Article Purpose

The purpose of this article is to design a MikroTik Hotspot network with User Manager Radius Server that will have

Network Diagram

For the configuration of this article I am going to establish a network like below network diagram.

MikroTik Hotspot Network with User Manager Radius Server

This is a simple and basic network diagram. In real situation, your network might be larger than this network but the basic diagram will remain same. In this network, the WAN Distribution Switch is connected to internet gateway. MikroTik Router’s (NAS) WAN interface and MikroTik User Manager Radius Server are also connected to this WAN Distribution Switch. Hotspot users will be connected to NAS Router through LAN Switch and will get internet access and MikroTik Router will communicate to Radius Server through WAN interface.

Core Devices and IP Information

To setup a Hotspot network according to above network diagram, I have installed and completed initial configuration of MikroTik User Manager Radius Server Package in a dedicated physical server where MikroTik RouterOS is running. I have also a physical MikroTik RouterOS (MikroTik RouterBOARD 1100AHX2) which is the NAS (Network Access Server) RouterOS of this network. IP information that I am using for this network configuration are given below.

This IP information is just for my RND purpose. So, change this information according to your network requirements.

MikroTik Hotspot and Radius Server Configuration with Data Limit and Prepaid Billing System

We are now going to start our Hotspot network configuration with User Manager Radius Server according to the above network diagram. The complete configuration can be divided into two parts.

Part 1: MikroTik RouterOS Configuration (NAS Router)

In the first part, we will configure our MikroTik RouterOS (NAS) so that it can turn into a Hotspot Server and can communicate with Radius Server to authenticate users. Complete RouterOS configuration can be divided into below topics.

Basic MikroTik RouterOS Configuration

MikroTik Router basic configuration includes WAN IP Assign, DNS IP Assign and Default Gateway Configuration. The following steps will show how to perform these topics in your MikroTik RouterOS.

MikroTik Router basic configuration has been completed. Now we will configure Hotspot Server in our NAS RouterOS.

Hotspot Configuration in MikroTik RouterOS

After completing MikroTik Router basic configuration, we will now setup Hotspot Server in our MikroTik RouterOS. The following steps will show how to setup Hotspot Server in your MikroTik RouterOS.

MikroTik Hotspot server configuration has been completed. In the next step, we will configure Radius client in our MikroTik RouterOS.

Radius Client Configuration in MikroTik RouterOS

The following steps will show you how to configure Radius client in MikroTik RouterOS.

Radius client configuration has been completed. Now MikroTik RouterOS is able to communicate with Radius Server to authenticate Hotspot users.

Part 2: MikroTik User Manager Radius Server Configuration

MikroTik User Manager Radius Server installation and initial configuration has been discussed in my previous article. If you don’t have enough introduction with User Manager Radius Server installation and initial configuration, first spend some time to study that article and complete your Radius Server installation and initial configuration and then continue my below section. In this section, I will do below topics in our Radius Server for Hotspot user authentication, authorization and accounting.

Adding Client Router (NAS) in Radius Server

The following steps will show you how to add client router in User Manager Radius Server.

MikroTik RouterOS has been added in User Manager Radius Server as a client router. Now User Manager will reply any query that will be asked by our MikroTik RouterOS.

User Profile Configuration for Data Limitation

We will now create two Data Limitation packages (512MB for 2 week validation and 1GB for 30 days validation) in User Manager Radius Server. The following steps will show how to create Data Limit packages in User Manager Radius Server.

We have created two Data Limit packages in our profile configuration. Similarly you can create as many Limitation packages as you want following the above steps properly. In the next section, we will create Voucher or Scratch card Template in our Radius Server.

Creating Voucher Template

Now we are going to create scratch card template so that after creating users we can print scratch card according to this template. The following steps will show how to create scratch card or voucher template in User Manager Radius Server.

You can change this card design if you have a little HTML and CSS idea. If you need to change only card text, just change texts in Row textarea according to your requirement.

Adding User in User Manager Radius Server

The following steps will show how to add random users in your User Manager Radius Server.

Now click on Generate button and you will find your entire scratch cards in a HTML page like below image.

Now sell these cards to your nearest shop and get auto revenue monthly or your desired time period.

Hotspot Server is now ready to authenticate users via User Manager Radius Server. Now it is time to test our Hotspot server. For this, connect any IP device to your network. After connecting, a dynamic IP will be assigned to your device from DHCP server that was created while installing Hotspot server. Usually, Hotspot uses DHCP server to assign IP address and other related information that are necessary to get login page. Now open any web browser and try to visit any web page. You can see the login page of your Hotspot server. If you do not get login page for any cause, type your DNS name that was provided while installing Hotspot server. Now you can see your Hotspot login page like below image.

Hotspot Login Page

Accessing User Page

Radius Server offers a user page where user can login their profile page and can show their account status as well as can change their account information and password. The following steps will show how to access this user page in your Radius Server.

Following the above described method, you can easily create a data limitation and prepaid billing system network with MikroTik Hotspot and User Manager Radius Server. However, if you face any confusion to follow above method, watch my video about MikroTik Hotspot Configuration with Data Limit and Prepaid Billing System. I hope, it will reduce your any confusion.

MikroTik Hotspot Configuration with Data Limit and Prepaid billing System has been explained in this article. I hope you are now able to setup a Hotspot Server with Radius Server that will have data limitation and prepaid billing system. However, if you face any confusion, feel free to discuss in comment or contact with me from Contact page. I will try my best to stay with you.

Exit mobile version