TCP Proxy to service on same network as node

Started by djex81, February 20, 2024, 11:22:10 PM

Previous topic - Next topic

djex81

So I've been playing around with the new TCP Proxy feature and it seems I am only able to access local ports on a particular node. Is it possible to proxy to a service located on another device on the same network as the node?

For example I would like to access a Synology web admin panel through another node on the same network. The local network address for the admin panel would be something like http://192.168.1.10:5000 . When configuring the Local Command in Object Tools the TCP Tunnel check box only allows to specify a port number. There seems to be no where to supply an address. Is it possible to configure the current TCP proxy to do this or is it only possible to proxy local ports on a node?

I've used remote access software in the past that allowed me to do this. Not sure if I'm missing something here.

Victor Kirhenshtein

It works as following. First of all, you have to enable TCP proxy on a proxy agent. By default it will be agent running on NetXMS server, or if zoning is enabled, agent running on zone proxy. When you run object tool with TCP proxy option, client will open random local port for listening, then establish tunnel to proxy agent, and when you open TCP connection to this random local port, proxy agent will establish TCP connection to target node on port set in object tool configuration.

So, for example, let's say you have Synology device reachable at 192.168.1.10 by the server. You will do the following steps:
1. You Synology device to NetXMS as a node, and specify 192.168.1.10 as primary IP address.
2. Enable TCP proxy on server's agent.
3. Enable TCP port forwarding option in object tool, and use URL http://${local-address}:${local-port}

When running on Synology node, this tool should open browser on local host which will be forwarded to Synology device.

Best regards,
Victor

djex81

Thanks for the reply. There are two issues I have:

  • First the Synology device is not on the same network as the netxms server. I am using another workstation on the network of the Synology NAS as an SNMP proxy to monitor the Synology NAS.
  • I can not install the netxms agent on the Synology NAS because it is running a custom linux distro that is not supported by netxms agent (I tried)

And so I need some way to TCP proxy from the workstation that is on the same network as the Synology NAS to the Synology's web admin panel on port 5000.

I can enable TCP proxy on the workstation agent however there seems to be no way in object tools to configure the tool to access a specific IP along with the port.

I have used this feature in other remote access software which would allow specifying both the Remote Host IP and Remote Host Port to proxy. Not sure if this is possible with the TCP proxy feature or if there are any workarounds.

Filipp Sudanov

In this case You'd need to create a Zone and set this worksation, which is on the same network as Synology NAS as proxy for that zone.