Ylianst / MeshCentralRouter

Windows tool that performs TCP/UDP port mapping thru the MeshCentral server
https://meshcentral.com
Apache License 2.0
53 stars 38 forks source link

Implement a way to have a "permanent" port mapping #48

Open Sungray opened 1 year ago

Sungray commented 1 year ago

Currently if I want to open a port, I have to:

I would like instead:

Ylianst commented 1 year ago

Once you have mappings setup, save the mappings like this:

image

It will create a .mcrouter file. You can edit this file with a text editor. You can add your account password if you like:

{
  "hostname": "central.mesh.meshcentral.com",
  "username": "admin",
  "password": "xxxxxxx",
  "certhash": "1A77E61E99CEB54A0BF8FA8CADE27290692C1CE9F72AF68C7CECAECAC7531179B4767A060C8E31D19E01911D0E80AB7A",
  "mappings":[
    {
      "nodeName": "AmtMachine15",
      "meshId": "mesh//7b4b43cdad850135f36ab31124b52e47c167fba055ce800267a4dc89fe0e581c",
      "nodeId": "node//B2RZYRSSGZiNaha47HIz4qT7WKxCF1CN1v1iiuUy$55NQM96eP5L4jNyilKzxY4e",
      "appId": 3,
      "protocol": 1,
      "localPort": 50030,
      "remotePort": 3389
    }
  ]
}

Then, double click on this .mcrouter file and associate the file type to MeshCentralRouter.exe if it's not already done. When you click on your mapping, MeshCentralRouter will open, login and start the mappings right away.

Let me know if that works.