Log in Start free trial
Getting started · Connect your MikroTik
Docs / Getting started

Connect your MikroTik

Connecting a router takes one script. You paste it into Winbox once, and the router appears online in the panel a few seconds later.

You need RouterOS 7. Take a backup of the router first, as you would before any change: Files → Backup in Winbox.

Create the script

  1. In the panel, open Connect a router (/routers/connect).
  2. Give the router a name, for example Main POP.
  3. Keep the API password the panel suggests, or type your own (at least 12 characters).
  4. Press Create script.

The script contains this router's private tunnel key. It is shown only once and is never saved. Do not share it. If you lose it before running it, delete the router in the panel and create a new script.

Run it on the router

  1. Open Winbox and connect to the router.
  2. Open New Terminal.
  3. Press Copy script in the panel, paste it into the terminal and press Enter. Paste the whole block, including the { at the start and the } at the end.
  4. Wait a few seconds. The panel page turns green and shows Connected.

Your customers and packages are read from the router right after it connects.

What the script adds

Everything the script creates is marked NetMunshi, so you can always find it. It does not change your customers, packages, pools or your own firewall rules.

On the router Why
WireGuard interface wg-netmunshi and a tunnel IP The secure link to NetMunshi
Firewall rules at the top, only for the tunnel Allow the API and ping from NetMunshi only; block everything else on the tunnel
A NAT rule that skips the tunnel So your own src-nat rules do not break the tunnel
The NetMunshi tunnel IP in the API service's allowed list So NetMunshi can reach the API; your other allowed IPs are kept
User netmunshi in its own group Logs in only from the tunnel, and has no Winbox, SSH, FTP, reboot or password rights

Running the script again is safe. It removes the old NetMunshi items first and adds them fresh.

Notes the script may print

At the end, the script tells you about a few things it found. Nothing is changed because of them; they are only there so you know.

  • API was limited to other addresses. Another system (for example SmartOLT or an old billing system) had locked the API to its own IP. NetMunshi's tunnel IP was added next to it. If that system rewrites the list later, add the tunnel IP back.
  • PPP RADIUS is on. Your customers log in through a RADIUS server, not the router's own secrets. Import what is on the router, and plan to move customers off RADIUS. See Bring your customers.
  • srcnat rules without an out-interface. Rules like that also catch the router's own traffic. The NetMunshi no-NAT rule was placed above them, so the tunnel keeps working.

If it does not turn green

  • Wait a minute. The first connection can take up to a minute.
  • Check the router's internet. The router must reach the NetMunshi server on the WireGuard UDP port written in the script (serverPort). Some upstream providers block uncommon UDP ports; ask them to open it.
  • Ping the server through the tunnel: in the terminal, ping the server's tunnel IP written in the script (serverWgIp), for example /ping 10.88.0.1. If it times out, look for a src-nat rule above the NetMunshi one in IP → Firewall → NAT.
  • Still stuck? Send us a screenshot of the terminal output on WhatsApp.

Removing NetMunshi from a router

At the bottom of the Connect a router page, open Remove NetMunshi from a router and run that script on the router. It removes the tunnel, the firewall and NAT rules, and the netmunshi user. Your customers and packages stay on the router.

Still stuck? Ask us on WhatsApp or email us. Updated 6 Dec 2026.