0
  • A is my laptop, at home.
  • B is a server (AWS instance) under my control.
  • C is a machine on my work network (no externally visible IP address) and it runs a VNC server, or NoMachine, or similar. The machine is under my full control but let's assume the work network isn't.

This is not going to be a question about connecting A->C via a straightforward A->B->C tunnel as in multiple other postings; rather, it aims to achieve A->C via A->B<-C. Both A and C can connect to B via ssh, but B cannot initiate a connection to C (or to A for that matter).

How can I initiate connections from C to B (before I leave work), and also A to B (when I get home), such that C's VNC service becomes accessible to A?

Basically this is a homebrew attempt to replace TeamViewer/LogMeIn/AnyDesk without (1) paying ridiculously high license fees, or (2) needing to have an internet-exposed IP address for the target machine C. (Suggestions for alternative Mac- + Windows- compatible solutions are welcome if this is an XY problem, but so far I have not found a third-party solution that avoids both issues.)

jez
  • 101
  • 1
    Ask your IT department to provide VPN access. – Gerald Schneider Sep 23 '22 at 16:16
  • I agree with gerald, off topic due it will break the Rules for mostly the Company Rules – djdomi Sep 23 '22 at 16:51
  • 1
    On your work computer, just run an `ssh` connection in a `while` loop (so that it reconnects on failure) that connects to machine `B` with appropriate port forwarding options (e.g., `ssh -R 2200:localhost:22 machineB.example.com`)...of if you've already tried something like that, show us specifically what you've tried and explain where it didn't seem to work out. – larsks Sep 23 '22 at 20:12
  • 1
    @larsks Thanks. My question was borne out of not knowing what to try, because of an incomplete understanding of the terms used in the documentation I could find. But I found a clear enough tutorial at https://phoenixnap.com/kb/ssh-port-forwarding and I think I have a working solution (along the lines you suggest). I guess I won't post the answer if it's going to be considered off-topic due to misuse (I'm new here). – jez Sep 23 '22 at 20:29

0 Answers0