How the three boxes work together
Each device does one job. Starlink just gets you internet. The MikroTik is the brain â it hands out access, charges for time, and keeps one customer from hogging the link. The Cudy is just a dumb, open Wi-Fi radio.
What you need
Four things, plus a laptop for the one-time setup.
Wire it up
Three cables, in this order. Leave the admin laptop plugged in until Step 4 is done.
- Starlink â MikroTik: plug the Starlink Ethernet Adapter cable into port ether1 on the hEX.
- MikroTik â Cudy: plug a cable from ether2 on the hEX into the Cudy's WAN/LAN port.
- Laptop â MikroTik: plug your admin laptop into ether3 (unplug this once setup is done, or leave it â it's harmless either way).
Put the Starlink into Bypass Mode
This turns off Starlink's own Wi-Fi and router, and hands its internet connection straight through the cable to the MikroTik.
- Open the Starlink app on your phone, connected to the dish.
- Go to Settings â Network.
- Turn on Bypass Mode and confirm.
- The dish reboots (~2 minutes). When it's back, it's just a dumb internet pipe.
Set the Cudy to Access Point mode
The Cudy must not hand out its own internet addresses â it just needs to be a Wi-Fi radio.
- Connect a laptop/phone to the Cudy and open http://cudy.net (or http://192.168.10.1).
- Go to Advanced Settings â Operation Mode, choose Access Point (AP), and save â the Cudy will reboot.
- Under Wireless Settings, set the network name, e.g. "Starlink Wi-Fi â Login Required."
- Set security to Open / None â customers connect instantly and get redirected to the login page.
- Turn on AP / Client Isolation. This is not optional on an open network â without it, customers can see and probe each other's devices.
Configure the MikroTik
Skip the manual steps below by running the installer from Step 5 â it configures the router over SSH automatically. This section is here if you'd rather do it by hand in WinBox.
Get online, and name the ports
# WAN on ether1, hotspot on ether2
/interface set [find default-name=ether1] name=ether1-WAN
/interface set [find default-name=ether2] name=ether2-Hotspot
/ip dhcp-client add interface=ether1-WAN disabled=no add-default-route=yes use-peer-dns=yes
/ip firewall nat add chain=srcnat out-interface=ether1-WAN action=masquerade
Give the hotspot its own network
# A big pool: phones use several random addresses each
/ip address add address=10.10.0.1/22 interface=ether2-Hotspot network=10.10.0.0
/ip pool add name=hotspot-pool ranges=10.10.1.1-10.10.3.254
/ip dhcp-server add name=dhcp-hotspot interface=ether2-Hotspot address-pool=hotspot-pool lease-time=30m disabled=no
/ip dhcp-server network add address=10.10.0.0/22 gateway=10.10.0.1 dns-server=10.10.0.1,1.1.1.1
/ip dns set allow-remote-requests=yes servers=1.1.1.1,8.8.8.8
Turn on the hotspot itself
/ip hotspot profile add name=hsp-profile hotspot-address=10.10.0.1 dns-name=hotspot.local login-by=http-pap,mac-cookie use-radius=no /ip hotspot add name=hs-starlink interface=ether2-Hotspot address-pool=hotspot-pool profile=hsp-profile disabled=no
http-pap only? The simplified single-PIN login page in Step 6 doesn't do the extra CHAP handshake â so the profile shouldn't ask for it either. Keeping them matched avoids a class of "login just doesn't work" bugs.
Create the pricing tiers
# Up to 3 Mbps up / 10 Mbps down, one device per token
/ip hotspot user profile add name="1-Hour-Token" rate-limit="3M/10M" shared-users=1 mac-cookie-timeout=1d
/ip hotspot user profile add name="6-Hour-Token" rate-limit="3M/10M" shared-users=1 mac-cookie-timeout=1d
/ip hotspot user profile add name="24-Hour-Token" rate-limit="3M/10M" shared-users=1 mac-cookie-timeout=1d
Run the installer â router + voucher panel, one command
This does everything above automatically: connects to the MikroTik over SSH (it assumes a factory-fresh router at 192.168.88.1), pushes the full network/hotspot/token config, enables the API, prints 20 starter vouchers, then installs Mikhmon â the voucher/point-of-sale panel â on whatever Linux box you run it from, already linked to the router.
Plug a Linux machine (a Raspberry Pi is perfect) into one of the MikroTik's free LAN ports, then run:
curl -fsSL https://longridge.co.zw/install.sh | sudo bash
No prompts â it makes sensible assumptions and reports exactly what it did (and any voucher PINs) at the end. If your router already has a different IP or password set, override without touching the script:
curl -fsSL https://longridge.co.zw/install.sh | MIKROTIK_IP=192.168.88.1 MIKROTIK_USER=admin MIKROTIK_PASS='yourpass' sudo -E bash
Prefer to generate vouchers by hand from the MikroTik terminal instead? Paste this any time:
:for i from=1 to=20 do={
:local pin ([:rndnum from=100000 to=999999]);
/ip hotspot user add name=$pin password=$pin profile="1-Hour-Token" limit-uptime=1h comment="1HR-Batch-1";
:put ("Voucher PIN: " . $pin);
}
Make the login page a single PIN box
The one step the installer can't safely automate â MikroTik's own hotspot template syntax and RouterOS's scripting syntax both use $(...), so pushing this file by script risks mangling it. Five minutes by hand in WinBox instead. By default the login page asks for a username and a password; customers only have one PIN, so make it one field.
- In WinBox, go to Files, find hotspot/login.html, and drag it to your desktop.
- Open it in a text editor and replace the username/password fields inside the
<form>with the block below. - Drag the edited file back into the hotspot folder in WinBox Files, overwriting the original.
<form name="login" action="$(link-login-only)" method="post">
<input type="hidden" name="dst" value="$(link-orig)" />
<input type="hidden" name="popup" value="true" />
<label for="voucher">Enter Voucher PIN</label>
<input type="text" id="voucher" name="username" placeholder="e.g. 482910" required />
<input type="hidden" id="password" name="password" />
<script>
document.forms.login.onsubmit = function () {
document.getElementById('password').value = document.getElementById('voucher').value;
return true;
};
</script>
<button type="submit">Connect to Internet</button>
</form>
Test it
- Connect a phone to the Cudy's Wi-Fi network.
- A "Sign in to Wi-Fi network" prompt should appear automatically â tap it.
- If it doesn't appear, open a browser and go to any plain http:// site â you'll be redirected to the login page.
- Enter one of the PINs from Step 5 and connect.
- In WinBox under IP â Hotspot â Active, you'll see that customer's MAC address, IP, uptime, and data used.
Quick troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Installer can't reach the router | Not plugged into a MikroTik LAN port, or the router isn't at its factory-default 192.168.88.1 | Check the cable, or re-run with MIKROTIK_IP= set to its actual address |
| No internet at all | Starlink not in Bypass Mode, or cable in the wrong port | Confirm ether1 has a DHCP-assigned WAN address under IP â DHCP Client |
| Login popup never appears | Phone's connectivity check used HTTPS, which the hotspot can't intercept | Open any plain http:// site manually â this is a known limitation on iOS/Android, not a config error |
| PIN rejected | login-by mismatch, or PIN already expired/used | Confirm the hotspot profile is http-pap,mac-cookie and the voucher hasn't expired |
| Wi-Fi visible, but customers can see each other | AP/Client Isolation is off on the Cudy | Re-check Step 3, turn isolation on |
| Speeds crawl with several users on | Rate limit too high for your Starlink plan, or router overloaded | Lower the rate-limit values in the token profiles |
Quick reference â everything in one block
Copy-paste this whole thing into a fresh MikroTik terminal to rebuild the setup from scratch â or just run the installer from Step 5, which does this over SSH automatically.
Setup
/interface set [find default-name=ether1] name=ether1-WAN /interface set [find default-name=ether2] name=ether2-Hotspot /ip dhcp-client add interface=ether1-WAN disabled=no add-default-route=yes use-peer-dns=yes /ip firewall nat add chain=srcnat out-interface=ether1-WAN action=masquerade /ip address add address=10.10.0.1/22 interface=ether2-Hotspot network=10.10.0.0 /ip pool add name=hotspot-pool ranges=10.10.1.1-10.10.3.254 /ip dhcp-server add name=dhcp-hotspot interface=ether2-Hotspot address-pool=hotspot-pool lease-time=30m disabled=no /ip dhcp-server network add address=10.10.0.0/22 gateway=10.10.0.1 dns-server=10.10.0.1,1.1.1.1 /ip dns set allow-remote-requests=yes servers=1.1.1.1,8.8.8.8 /ip hotspot profile add name=hsp-profile hotspot-address=10.10.0.1 dns-name=hotspot.local login-by=http-pap,mac-cookie use-radius=no /ip hotspot add name=hs-starlink interface=ether2-Hotspot address-pool=hotspot-pool profile=hsp-profile disabled=no /ip hotspot user profile add name="1-Hour-Token" rate-limit="3M/10M" shared-users=1 mac-cookie-timeout=1d /ip hotspot user profile add name="6-Hour-Token" rate-limit="3M/10M" shared-users=1 mac-cookie-timeout=1d /ip hotspot user profile add name="24-Hour-Token" rate-limit="3M/10M" shared-users=1 mac-cookie-timeout=1d /ip service enable api
Print 20 vouchers
:for i from=1 to=20 do={
:local pin ([:rndnum from=100000 to=999999]);
/ip hotspot user add name=$pin password=$pin profile="1-Hour-Token" limit-uptime=1h comment="1HR-Batch-1";
:put ("Voucher PIN: " . $pin);
}