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

NOTE

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: 172.16.20.10)
    • Connect to HSG through SSH (HSG box eth2 ip address – 10.10.10.1/24 /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 172.16.10.10 key testing123 name MikrotikR1
HSG800-WTO(config-radius)# start
HSG800-WTO(config-radius)# do write memory

.

Configure Mikrotik Router

NOTE

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 Hotspot setting, navigate to ‘IP > Hotspot’ and click on Hotspot Setup button in the Servers tab.
Image2: Mikrotik Hotspot configuration interface
  1. Edit file ‘hotspot/login.html’ by navigate to menu ‘Files’
Image3: Mikrotik xxxxxxx xxxxxx
  1. Open the above file and edit code as per below
<html>
<title>...</title>
<body>
<form name="redirect" action="http://<HSG_IP>/pid/test/splash.php" method="post">   -----> ['action = 'url of the captive portal']
<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)">
</form>
<script language="JavaScript">
<!--
    document.redirect.submit();
//-->
</script>
</body>
</html>

  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.

.