Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
4.19k stars 563 forks source link

Agents not working for linux server #874

Closed kennyparsons closed 4 years ago

kennyparsons commented 4 years ago

I'm running the mesh instance on linux. Installed and running with the following command nodejs meshcentral

Ultimately, I would like this instance to work behind my Caddy reverse proxy, but for now, I'm just trying to get local lan to work (one step at a time to learn how everything works).

After installing the agent (on mac), nothing showed up. So I tried windows, since the agent install is much better (mac is lacking). The windows installer shows me the following:

Screen Shot 2020-01-26 at 6 02 29 PM

The server location of local (appears) to be incorrect, since the server is on my linux box.

What is happening here? Not getting much from the user/install guide, since this is basically a "step one" problem.

Ylianst commented 4 years ago

Hi. Your MeshCentral server is operating in "LAN mode", that is, a static DNS name or IP address was never set. In this mode, the agent will show the server location as being "local" and the agent will multicast on the local network to try to find the server. If you are in the same local network, the agent should be able to multicast, find it's server and connect to it.

If you intend to run MeshCentral in "Hybrid" or "WAN" modes, you have to run:

node node_modules/meshcentral --cert mystatic.dns.name

After this, when you download an agent, the name will be set and the agent will connect to the right place. Note that the name must be resolvable by the agent. Hope that makes sense.

kennyparsons commented 4 years ago

I ran it with nodejs meshcentral --cert mesh.mydomain.dev and added mesh.mydomain.dev to my dns server host file so a local ping of that domain resolves to my local ip.

When accessing via the local ip address first, I get a "bad certificate" error when trying to download the agent.

Next I tried accessing it via the internet behind Caddy. Here's my caddyfile:


mesh.techup.dev {
  proxy / https://127.0.0.1:445 {
    transparent
    websocket
    insecure_skip_verify
  }
  import gzip
  import headers
  import expires
  import ecc-tls-wildcard
}

I can access it just fine remotely and download the agent, but the agent still displays "local" as the location.

kennyparsons commented 4 years ago

I worked with @whalehub and he helped me get it working.