Hi,
I'm running an application on a bunch of nodes in a class A network, but can only access them from my own system if I log into the only node in that network that also has a class B address.
However, the client portion (with the GUI and everything) can run only on my system, so I need some way of communicating with the class A network. The client (my system) attempts to set up a simple TCP socket to the server (at the edge of the internal network, with a ServerSocket), but gets a Connection Timed Out exception. Since only the SSH port 22 is open, someone recommended I use SSH tunneling to send packets from my system to the internal network.
After a bit of Googling, I see that the following allows you to set up an SSH tunnel, but how would I use this from within Java to set up the sockets and what not? Thanks!
ssh -L 2222:10.10.10.10:22 174.174.174.174
EDIT: I have used JSch to set up port forwarding from my system to an internal node, but is there any way I can make it bidirectional without having to set up a separate tunnel on every internal node? (The nodes aren't using the same TCP connection to respond, but have set up new connections to my laptop's port 2222.)