Connect to your MikroTik devices
Integrate your MikroTik devices with your MyWiFi account and enable guest access capabilities.
- Active MikroTik subscription.
- Active MyWiFi subscription.
- A location with an associated campaign.
The configuration can be applied on MikroTik RouterBOARD devices with default settings -- as an out-of-the-box unit, or after a factory reset has been performed.
If the MikroTik device has a custom setup, this guide assumes that the MikroTik device is already configured to fit these parameters:
- There is a DHCP client (or IP address, gateway, and DNS IP addresses) on WAN interface.
- There is a NAT (masquerade) on WAN interface.
- There is an IP address and DHCP server on the interface that will be used as the hotspot.
- There is no hotspot configuration on the device already.
Retrieve the MAC address of your device
The MAC address of the MikroTik device can be obtained in two ways:
- Obtain the MAC address from the device label on the box or on the MikroTik device itself. A MAC address is a sequence of 12 numbers and the letters A-F often separated by colons (ex: A1:B2:C3:D4:E5:F6).
Access the MikroTik device using WinBox:
- Use WinBox to access the MikroTik device.
- Open the Interfaces menu.
- Select the Interface tab.
- Double click ether1 interface.
- Select the General tab and copy the MAC Address.
- Log in to your MyWiFi dashboard.
- Select Devices from the main menu.
- Click Add New Device.
- Select the Location, enter a Device Name, and choose MikroTik
- Provide the device's MAC address.
- Click Proceed.
- Copy and save the NasID.
- Click Confirm Setup.
Click here to download the Mikrotik configuration file package.
Download the package and unzip it into a folder. In that folder you will find another folder called mikrotik-files; you'll need to open config.txt with a text editor and edit it:
- Replace the YOUR_INTERFACE_NAME placeholder with the name of the interface that the hotspot will be running on (in the default configuration of MikroTik devices, this interface is named bridge).
- Replace the YOUR_NAS_ID placeholder with the NasID of the MikroTik device you just retrieved from MyWiFi.
- Save the file after completing the changes.
Please Note: If you have a Custom Social Portal URL enabled within MyWiFi, it will be necessary to add your Custom Social Portal Domain to the Allowed Hosts/Domains Whitelist.
Custom social portal URL
If you have a custom social portal URL, you will need to add it to your config.txt & login.html files.
Edit the config.txt file and add your custom social portal URL below the following 2 lines:
/ip hotspot walled-garden
You may add your domain in the following format:
For example, if your custom social portal URL was social.yourdomain.com, you would add:
It should look like:
/ip hotspot walled-garden
Next, open login.html and find this line:
You'll need to change it from using the domain https://securewifilogin.com to using https://yourdomain.com. It should look like this, with your custom social portal URL:
Next, you need to upload these files to your MikroTik device.
Connect to your MikroTik device with WinBox
- Drag and drop the config.txt file to the middle of the WinBox window.
If the upload to WinBox is successful, WinBox will display the File List window and it will include config.txt.
- Open a New Terminal window from the left menu and type import config.txt, then press enter.
If the operation was successful, after around 5 seconds you should see a message saying Script file loaded and executed successfully.
- Go to File List window (if it’s not open, click Files on the left menu) and drag and drop the three .html files from the configuration package (alogin.html, login.html, and rlogin.html) to the hotspot directory in the File List.
If the operation was successful, you should see the 3 files in the File List window.
Unable to access campaign
If you have any questions, please contact our support team by clicking the support icon located in the bottom right-hand corner of this page.
Please sign in to leave a comment.