Contents
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
- Configure captive portal in RansNet hotspot gateway. Refer Create and Edit Captive Portal
- Configure captive portal backend settings, User can enable ‘Username & Password’ from standard login method option . Refer Login Method
- Create new User Type (Username Authentication) in ‘User Management’ and click on
. Refer Create Manual User Accounts
- 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)
- Configure radius in Mikrotik
- User can navigate to ‘Radius > Add New > Configure RADIUS client’
- 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’

- Configure the Hotspot setting, navigate to ‘IP > Hotspot’, and click on the Hotspot Setup button in the Servers tab.

Enable login by HTTP-PAP on hotspot server profile

- Edit file ‘hotspot/login.html’ by navigating to menu ‘Files’

- Open the above file and edit the code as per below
<html>
<title>...</title>
<body>
<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)">
</form>
<script language="JavaScript">
document.redirect.submit();
</script>
</body>
</html>
- While list RansNet Hotspot Gateway’s IP is required,
- Navigate to ‘IP > Hotspot’ and select Walled Garden
- Click on ‘+’ symbol and select the ‘allow’ from the ‘Action’ field
- Select the RansNet Hotspot server from the ‘Server’ field
- Select the RansNet Hotspot server ip from the ‘Dst. Host’ and click on ‘Apply’ and ‘OK’ button.

.
