Wednesday 17 May 2017

Best way to trigger remote commands on a distant machine from Node JS server without using port forwarding on client side

Context : There is a fleet of linux computers located on different networks. I cannot use port forwarding on those network routers. There is a server on another public network on which I can open ports. On this server, a NodeJS server is running to host a website.

Goal : upon user action on the website, have the NodeJS server trigger a command on one of the remote linux computer.

The architecture I had in mind : -Every linux computer would all the time report to the server to maintain an open connection ("punch hole"). I was thinking of a Python script (both on client and server side). -A python script on the server would store the last way to communicate with every client in a DB (both connected to the NodeJS server and the Python script) -Upon specific user action on the NodeJS server, look in DB for the way to communicate with the client (IP and Port punch holed), and send a command to the client Python script directly or through a server Python script.

My questions : Am I going into the right direction ? Is there an easier way to proceed ?

Thank you in advance



via Easysky

No comments:

Post a Comment