MeshCentral: MeshCMD.exe not connecting to Mesh Central Server for port maps on Windows

Mesh Central Server Version:---------0.9.38 Mesh Central Router Version:--------1.8.7960.26198 MeshCMD Version:------------------0.2.1.3 Windows Version:--------------------21H1-19043.1288

The issue/question #112 has now become an issue. I have tested the port map functions of both Mesh Central Router and MeshCMD and have had the following results.

  1. Mesh Central Router was able to perform the port map connection perfectly without issues and was able to work with the Login Token option provided by Mesh Central Server.

  2. MeshCMD was unable to login to Mesh Central Server at all. Regular and token based logins did not work. In fact the Mesh Central Server Trace showed nothing. Thought well okay maybe it’s being held up at the reverse proxy. After inspecting the reverse proxy logs I couldn’t even find an attempted connection.

MeshCMD Debug Output:

Settings: {"action":"route","localport":2222,"remotename":"<remote machine name>","remotenodeid":"node//<remote machine node ID>","remotetarget":null,"remoteport":2222,"username":"<Token Username>","serverid":"<Server ID>","serverhttpshash":"<Webserver Cert Hash>","debuglevel":1,"serverurl":"wss://<Webserver domain name>:443/meshrelay.ashx"}
Connecting to <subdomain.domain.tld>.

This issues appears to be related to issue #2873 I suspect that there is some kind of issue with the URI construction like the issue listed above.

I need MeshCMD port map to work because I need to perform the port map on Linux systems. Please let me know if there is anything I can do to help you test for this issue.

Reference ticket from agents is #113

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 32 (15 by maintainers)

Most upvoted comments

Nice. Thanks for reporting back. So, now, I will (try) to add Windows service support to it.

No, Intel AMT or CIRA is not needed for port mapping to work.

Are you running MeshCMD on a Windows machine? If so, today I am going to add better proxy support in MeshCentral Router and at the same time, I would make a new version of MeshCMD in C# that would likely solve any proxy issue.

Basically, instead of writing my own code to handle the proxy, I would use Windows built-in code to deal with it. This has the benefit that is the proxy requires domain authentication, it would work. I will be spending today on this.

@Ylianst The new MeshCentralRouterCMD tool seems to be working perfectly! Thanks for adding the windows service feature. This should come in real handy for direct connecting windows systems to the backup system!

Closing this issue and opening a new one for the Linux version of this tool.

Would like to see this tool included in the MeshCentral Server GUI interface like the rest.

@Ylianst Success! This worked perfectly and on the first try with my current MeshAction.txt file!

MeshCentralRouterCMD Output:

MeshCentral Router CMD.
Connecting to wss://<subdomain.domain.tld>/control.ashx
Connected.
<Number of devices in account> device(s) in this account.
Port Mapping: Mapped local port 2222 to remote port 22

Nice! Let me finish up MeshCentralRouterCMD so it can perform TCP port maps and get back to you.

Ok, I super early version of a C# built Windows executable MeshCentral Router. This is not Linux compatible and can’t do any port maps. All it can do it connect to the server and display how many devices are in your account.

image

It’s a development executable, but I did sign it for authenticity. Put it in a temporary folder along with “MeshAction.txt” and run it with --pass xxx or put the password in the MeshAction.txt file.

Let me know if it works, if it goes thru the proxy and shows the number of devices in your account. If it does, we are on our way. I can finish up doing the TCP port mapping on it tomorrow.

I just checked in a big change to MeshCentral Router to use Windows WebSockets when available and backoff to built-in WebSockets when on Windows 7. I am now working on the new command line tool now.

Hybrid mode has no impact 😃 I will get the new tool ready asap.

Ha!!! I don’t think I have proxy support in MeshCMD… I need to look into that now.

I could also look into running MeshCentral Router from the command line.

MeshCentral Router works from command-line already in this instance but I need a tool that works with Linux since it’s going to be backing up a Debian machine.