Step-by-Step Guide to Setting up a MikroTik Hotspot with UserManager

Step-by-Step Guide to Setting up a MikroTik Hotspot with UserManager

Download
Download is available until [expire_date]
  • Version
  • Download 3
  • File Size 1.79 MB
  • File Count 1
  • Create Date February 5, 2025
  • Last Updated February 5, 2025

Setting up a MikroTik hotspot with its built-in User Manager RADIUS service involves several key steps. Here's a breakdown of the process:

1. Basic MikroTik Configuration:

  • Access your MikroTik Router: Connect to your MikroTik router using Winbox, WebFig, or the console.
  • IP Address Configuration: Ensure your MikroTik router has a properly configured IP address on its interfaces. One interface will connect to your internet source (WAN), and another will be for your local network (LAN).
  • DHCP Server Setup (Optional but Recommended): Configure a DHCP server on the LAN interface to automatically assign IP addresses to clients connecting to the hotspot. This simplifies client management.
  • DNS Configuration: Set up DNS servers on your MikroTik router. You can use public DNS servers like Google (8.8.8.8 and 8.8.4.4) or Cloudflare (1.1.1.1 and 1.0.0.1), or your ISP's DNS servers.

2. Hotspot Configuration:

  • Create a Hotspot Profile: Go to IP -> Hotspot -> Hotspot Profiles. Create a new profile. Crucially:
    • Name: Give your profile a descriptive name (e.g., "MyHotspot").
    • HTML Directory: This is where your custom hotspot login page files will reside if you want a branded login experience. If you're using the default, you don't need to change this.
    • Authentication: Select "RADIUS" as the authentication method.
  • Create a Hotspot Interface Binding: In the same Hotspot window, go to the Hotspot Interfaces tab and add the interface where you want the hotspot to be active (typically your LAN interface). Select the profile you created.
  • Address Pool: If you're not using a DHCP server, you'll need to define an address pool for the hotspot clients. Go to IP -> Pool and add a new pool with the IP address range you want to use. Then, in your Hotspot Profile, select this pool.

3. User Manager Configuration (RADIUS Server):

  • Enable User Manager: The User Manager is usually enabled by default, but double-check under System -> Packages that the "user-manager" package is installed and enabled.
  • Create a RADIUS Secret: Go to Radius in the main menu. Add a new RADIUS server entry. The most important setting here is the Secret. This secret is crucial for communication between the Hotspot and the User Manager. Choose a strong, unique secret and remember it!
  • Configure User Manager Profiles: Go to User Manager -> Profiles. Create profiles that define the access limits (time, data, etc.) for different user groups (e.g., "Free Trial," "Premium," etc.). You can set limitations, prices (if you're charging), and validity periods.
  • Create User Accounts: Go to User Manager -> Users. Create user accounts, assigning them to the appropriate profiles. You can also import users from a file.

4. Link Hotspot to User Manager (RADIUS Client):

  • Back to Hotspot Profile: Return to IP -> Hotspot -> Hotspot Profiles and edit your profile.
  • RADIUS Settings: In the profile, under the RADIUS tab:
    • Use RADIUS: Check this box.
    • Accounting: Check this box if you want to track user usage.
    • Servers: Add the IP address of your MikroTik router (usually 127.0.0.1 for the local router) and enter the Secret you configured in the RADIUS settings earlier.

5. Testing:

  • Connect a Device: Connect a device to the hotspot network.
  • Login Page: You should be redirected to the hotspot login page.
  • User Credentials: Enter the username and password of a user you created in User Manager.
  • Access: If everything is configured correctly, the user should be granted access based on their assigned profile.

Key Considerations and Troubleshooting:

  • Firewall Rules: Ensure your firewall rules allow RADIUS traffic (ports 1812 and 1813) between the hotspot and the User Manager.
  • HTTPS: For a more secure login, consider using HTTPS for your hotspot login page. You'll need to configure a certificate on your MikroTik.
  • Custom Login Page: You can customize the hotspot login page by creating your own HTML, CSS, and JavaScript files and placing them in the HTML directory specified in the Hotspot Profile.
  • Troubleshooting: If you encounter issues, check the MikroTik logs for any error messages. Pay close attention to the RADIUS logs and the User Manager logs. Double-check the RADIUS secret and ensure it matches in both the Hotspot profile and the RADIUS server settings.

This detailed guide should help you set up your MikroTik hotspot with the built-in User Manager RADIUS service. Remember to consult the official MikroTik documentation for the most up-to-date information and advanced configurations.

Spread the word:

Leave a Reply