Mastering Development User Help

Local computer and remote computer are behind NAT. How to make local network accessible with SOCKS?

I have a

  • Local computer (behind NAT).
  • An intermediate server which is publicly accessible and has a
    fixed IP address.
  • Remote computer (behind NAT and not the same as local computer).

I’d like to temporarily share access to a website on the local network via the local computer and an intermediate server using SOCKS/SSH, so that a remote computer can view it. Is this possible when both the remote computer and the local computer are behind NAT? If yes, how?

                      NAT       -   Static Public IP  - NAT
Local Network <- Local Computer - Intermediate Server - Remote Computer 

I know I can do this with ngrok and similar services, but I would like to learn how to do it myself using SSH and SOCKS.

Bounty: I will give preference to answers with example code and explanations on how to do it. Thank you.

UPDATE: I require SOCKS for dynamic port forwarding.
SOCKS with multiple hops

Leave a Reply

Your email address will not be published. Required fields are marked *