Configure your MikroTik hotspot in one go with the script generator

Updated on · MonMikroTik team

Configuring a MikroTik hotspot by hand takes dozens of commands: Internet access, bridge, DHCP, hotspot server, profiles, firewall, VPN… A single mistake and the WiFi does not work. The MonMikroTik configuration generator does all this for you: you fill in a form, and it produces a complete script that you paste into the router's terminal.

What the script configures

  • System: router name, time zone, time servers (NTP) and DNS;
  • Internet access (WAN): DHCP, static IP or PPPoE;
  • local network (LAN): bridge with the chosen ports, router address, DHCP for clients;
  • built-in WiFi (if the router has one): open network, with authentication done through the hotspot login page;
  • hotspot server: login page, DNS name, login methods, 1 device per MAC address;
  • Walled Garden: MonMikroTik and Ligdicash already allowed for ticket sales via Mobile Money;
  • user profiles (plans) in Mikhmon format: speed, price, validity and action on expiration;
  • MonMikroTik VPN tunnel to manage the router remotely;
  • security: basic firewall, unnecessary services disabled, connection-sharing prevention, admin password.

Open the generator

Log in to your account and open Générateur de config (Config generator) in the menu. You can also open it from a router's page (Ouvrir le générateur button). The form is prefilled with values suited to a WiFi zone: often you only need to change a few fields.

Fill in the form

WiFi and system

  • WiFi network name (SSID): the name your customers will see, for example “WiFi-Zone-Center”. Only used if the router has a built-in WiFi card.
  • Router name: to recognize it in Winbox and on the platform.
  • Time zone: important so that ticket validity is calculated at the right time (default Africa/Ouagadougou).

WAN (Internet access)

  • WAN port: the port connected to your box or Internet link, often ether1.
  • Connection type:
    • DHCP: the most common case, behind a 4G, fiber or satellite box;
    • Static IP: enter the WAN address (e.g. 192.168.1.10/24) and the gateway;
    • PPPoE: enter the username and password provided by your operator.

LAN network

Router address (gateway): the router's address on the client side, with the network size. The suggested value 13.13.13.1/23 allows about 500 devices. The generator warns you if the chosen network is too small. The WAN port is automatically excluded from the LAN bridge.

Hotspot

  • Server name: for example hotspot1. This is the name you will enter in Mikhmon Online.
  • Login page DNS name: the address of your login page, for example wifi.bf. Choose a short name that is easy to type.

User profiles (plans)

Each profile is a plan you sell. For each one:

FieldExamplePurpose
Plan name24hoursName shown in Mikhmon and on the tickets.
Speed (up/down)1M/2MMaximum speed per client.
Price300Ticket price, used in sales reports.
Validity24 hoursLifetime of the ticket from first login.
On expirationBlock + record the saleWhat happens to the expired ticket.

The “On expiration” choices are Mikhmon's: no expiration, remove the user, block the user, or the same options + record the sale. Choose a “+ record the sale” option so your sales appear in the reports. The Dupliquer (Duplicate) and Supprimer (Delete) buttons let you quickly create several plans. You can also add no profile at all and add them later.

MonMikroTik tunnel

Check Connecter ce routeur à MonMikroTik (Connect this router to MonMikroTik) and choose one of your VPN clients: the tunnel is included in the script, and there is nothing more to install afterwards. Without a tunnel, the platform cannot manage the router remotely (unless it has a public IP). The Saisie manuelle (Manual entry) option lets you use another L2TP or OpenVPN server.

Security

  • Basic firewall: blocks access to the router from the Internet, while letting the MonMikroTik tunnel through. Recommended.
  • Disable telnet, ftp and the web interface: reduces attack points. Recommended.
  • Prevent connection sharing: a customer cannot share their ticket through a mobile hotspot.
  • New admin password (8 characters minimum): strongly advised, because a reset router has no password.

Apply the configuration to the router

Click Générer (Generate), check the summary (WiFi network, router name, profiles, tunnel) then Confirmer (Confirm).

The script is designed for a router reset without the default configuration. Applied to a router that is already configured, it may conflict with the existing setup. Back up your configuration first if needed (Files > Backup). Already have tickets sold? Follow Reconfigure a router without losing your users.
  1. Reset the router without the default configuration. In the terminal:
    /system reset-configuration no-defaults=yes
    or in Winbox: System > Reset Configuration, check No Default Configuration.
  2. After the restart, the router no longer has an IP address: connect with Winbox via the MAC address (Neighbors tab), user admin, no password.
  3. Open New Terminal.
  4. Apply the configuration, as you prefer:
    • Copier le script (Copy the script), then paste it into the terminal (right-click > Paste). Works even if the router does not have Internet yet;
    • Lien temporaire (Temporary link): a short /tool fetch command that downloads and imports the script. The router must already have Internet access. The link is valid for 10 minutes and only once, and the file is deleted from the router after the import;
    • Télécharger .rsc (Download .rsc): drag the file into Winbox's Files, then run /import file-name.rsc.
  5. Wait for the final message “MonMikroTik : configuration appliquee” (configuration applied). Winbox may disconnect for a few seconds at the end: this is normal, reconnect.
The script contains passwords (admin, PPPoE, VPN). Do not share it, and delete the downloaded .rsc file after use.

Check the result

  • Connect a phone to the WiFi or to a LAN port: the hotspot login page should appear.
  • On the platform, the VPN client switches to En ligne (Online).
  • Add the router to Mikhmon Online with the tunnel IP, the hotspot server name and the DNS name you chose: your profiles appear, ready to generate tickets.
  • If in doubt, check the script log:
    /log print where message~"mm-config"
    Each failed step is reported there with a mm-config: echec … line; the other steps are still applied.

Common problems

ProblemSolution
The temporary link does not workThe router does not have Internet yet, the 10 minutes have passed, or the link has already been used. Generate again, or paste the full script.
No Internet after the configurationCheck the WAN port and connection type you chose. With PPPoE, check the username and password.
The login page does not appearThe port used may be the WAN port, or it was not added to the LAN. Try another port, then check the mm-config log.
Winbox can no longer find the router by its IPConnect via the MAC address, or to the chosen LAN address (default 13.13.13.1) from a LAN port.
The WiFi does not appearThe router has no built-in WiFi card, or uses an unsupported driver model: configure the SSID by hand in Winbox.

Manage your MikroTik hotspot from the cloud

Mikhmon Online, ticket sales via Orange Money and Moov Money, resellers and VPN. Free sign-up.