blog posts

MikroTik

How to configure a MikroTik router for HotSpot Gateway operation

In this article, we field questions from customers on configuring their MikroTik routers for various functions. We’ll be covering how to setup MikroTik routers for HotSpot Gateway functionality.

Additionally, HotSpots are ideal for small businesses that want to offer WiFi to their customers without worrying about their network becoming compromised.

It can also be a valuable tool for companies with remote work-from-home (WFH) employees. Whatever the reason is that you’re looking to setup your MikroTik with the HotSpot gateway functionality activated, we’ll provide the steps necessary for you to do so. Our guide below draws from Mudasir Mirza’s MikroTik HotSpot server setup, which we also recommend reading—we’ve added some helpful details as well.

A hotspot is a method for authorizing users to access specific network resources, but it does not provide traffic encryption. To log in, users can use almost any web browser (either HTTP or HTTPS protocol), eliminating the need to install an additional gateway. The gateway accounts for the uptime and amount of traffic each client has used, and can also send this information to a RADIUS server. The HotSpot system may limit each user’s bitrate, total traffic, uptime, and other parameters mentioned further in this document.

The HotSpot system is designed to provide authentication within a local network, allowing local network users to access the Internet. However, it may also be used to authorize access from external networks to local resources (such as an authentication gateway for the outside world to access your network). It is possible to allow users to access some web pages without authentication using the Walled Garden feature.

HotSpot Aim and features

The MikroTik HotSpot Gateway provides authentication for clients before access to public networks. A HotSpot only works reliably when the IPv4 protocol is used; the HotSpot relies on Firewall NAT rules, which aren’t supported with IPv6.

The HotSpot gateway features:

  • Various authentication methods of clients using a local client database on the router or a remote RADIUS server
  • Users’ accounting in the local database on the router or the remote RADIUS server
  • Walled-garden system, access to some web pages without authorization
  • Login page modifications for companies
  • Automatically and transparently change any IP address of a client to a valid address

MikroTik Hotspot Setup

The simplest way to setup a HotSpot server on the MikroTik router is through the WebFig portal. To log in to your router, paste its IP address into the search bar and enter your admin credentials.

You should arrive at the home screen. Located the buttons at the top right, labeled “Quick Set”, “WebFig”, and”Teandal”. Click on the Terminal button.

First, we need to configure the interface connected to the Wide Area Network (WAN). Type the following into the terminal and press Enter:

ip address add address=192.168.1.5/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether1

Now we need to configure the second interface for our Local Network. Type the following into the terminal and press Enter:

ip address add address=10.10.0.1/24 network=10.10.0.0 broadcast=10.10.0.255 interface=ether2

Both interfaces are now configured.

How to SetUp the DNS

Next, we will setup the DNS server.

  1. Click the button at the top labeled “WebFig”. You should arrive at a screen with several buttons on the left side.
  2. Select the IP drop-down arrow, then click DNS. Fill in the information provided by your ISP, and ensure that the Allow Remote Requests option is checked.
  3. Apply your settings, then navigate to the Routes button on the left side of the screen.

How to SetUp the Routes

  1. Click the “Add New” button at the top of the Gateway.
  2. Under Gatewentertype, the address of the gate for your WAN interface. Apply your settings, then navigate to the HotSpot button on the left side of the screen.

How to SetUp the Hotspot

  • Click the “HotSpot setup” button at the top of the screen. Select ether2, as this is the interface connected to the local network.
  • The next screen will ask for the local address of the network. You won’t need to make any changes here, so click Next.
  • The next page will request the IP range to be used by the DHCP server for assigning IP addresses to clients. Ensure the IP range is suitable for the server. When you’re finished, click Next.
  • Select”no” for the certificate. Click Next.
  • Click Next.
  • We don’t need to make any changes to this screen because we have already configured it in an earlier step. Click Next.
  • Now you’ll need to define your server’s name by which clients can access the HotSpot’s login page through a web browser. Type the name you’d like and click Next.
  • The last step is to create a user. By default, it makes a user with admin privileges and no password. Here, you can set the password and username for the default user. Change the values if you’d like, then click Next.

Conclusion

So, your HotSpot server is now configured. Try logging in to make sure it works properly. And we hope you enjoy reading it.