Integration – RansNet HotSpot & Mikrotik Router

This section covers steps to configure HSG and Mikrotik devices to provide hotspot with user authentication, The HSG will work to provide a captive portal (Landing page), a RADIUS server, or proxy. The Mikrotik device will function as a hotspot gateway.


Procedure – Integration with Mikrotik

Configure RansNet Hotspot Gateway


Portal Template version should be equal to or greater than 202201171250

User can navigate to ‘HOTSPOT SETTINGS > Portal Templates’ and look for

  1. Configure captive portal in RansNet hotspot gateway. Refer Create and Edit Captive Portal
  1. Configure captive portal backend settings, User can enable ‘Username & Password’ from standard login method option . Refer Login Method
  1. Create new User Type (Username Authentication) in ‘User Management’ and click on Entity savechanges. Refer Create Manual User Accounts
  1. Configure radius request (Client) from Mikrotik’s IP (ex:
    • Connect to HSG through SSH (HSG box eth2 ip address – /Console. Refer Getting Console Access for console access.
    • Login using ‘support’ and ‘enable’ credentials and configure the radius code as per below.
HSG800(config)# security radius-server
HSG800-WTO(config-radius)# client key testing123 name MikrotikR1
HSG800-WTO(config-radius)# start
HSG800-WTO(config-radius)# do write memory


Configure Mikrotik Router


Supported model – Mikrotik RB750 and version – 6.48.1 (Stable version)

  1. Configure radius in Mikrotik
    1. User can navigate to ‘Radius > Add New > Configure RADIUS client’
    2. Add RansNet Hotspot Gateway IP address in the Mikrotik RADIUS Server interface (Address) and the key configured in RansNet security radius in the field ‘Secret’
Image1: Mikrotik RADIUS configuration interface
  1. Configure the Hotspot setting, navigate to ‘IP > Hotspot’, and click on the Hotspot Setup button in the Servers tab.
Image2: Mikrotik Hotspot configuration interface

Enable login by HTTP-PAP on hotspot server profile

  1. Edit file ‘hotspot/login.html’ by navigating to menu ‘Files’
Image3: Mikrotik File List Interface
  1. Open the above file and edit the code as per below
<form name="redirect" action="http://<HSG_IP>/pid/test/splash.php?nasid=<location/identity>" method="post">
<input type="hidden" name="mac" value="$(mac)">
<input type="hidden" name="ip" value="$(ip)">
<input type="hidden" name="user" value="$(username)">
<input type="hidden" name="link-login" value="$(link-login)">
<input type="hidden" name="link-orig" value="$(link-orig)">
<input type="hidden" name="error" value="$(error)">
<script language="JavaScript">

  1. While list RansNet Hotspot Gateway’s IP is required,
    1. Navigate to ‘IP > Hotspot’ and select Walled Garden
    2. Click on ‘+’ symbol and select the ‘allow’ from the ‘Action’ field
    3. Select the RansNet Hotspot server from the ‘Server’ field
    4. Select the RansNet Hotspot server ip from the ‘Dst. Host’ and click on ‘Apply’ and ‘OK’ button.