#StackBounty: #networking #ssh #remote-desktop #port-forwarding #ssh-tunnel Forwarding internet access to a remote machine

Bounty: 50

Unlike Forwarding Internet connection via SSH to a Linux console , my REMOTE machine is not behind a firewall.

REMOTE (192.168.12.34)

  • A machine that’s connected locally only to the SERVER and a couple of machines within the same switch in the 192.168.. IP range.

SERVER (10.0.0.1 and 192.168.12.1)

  • A server that is connected to an internal network shared with my LAPTOP and other machines (in the 10.0.. IP range)
  • The server is also connected to a local switch that’s not on the internal network but that allows connection to REMOTE (in the 192.168.. IP range)
  • Has connection to the internet.

LAPTOP (10.0.98.76)

  • My machine that can access SERVER through an internal network shared with SERVER and other machines but not REMOTE
  • Has connection to the internet.

To access the REMOTE from the LAPTOP, I usually do two hops, first to SERVER then to REMOTE

$ ssh 10.0.0.1
$ ssh 192.168.12.34

My question is how to forward all connections to and from REMOTE to the internet through SERVER?

I’ve no physical access and no GUI to both SERVER and REMOTE, so I can only do it through LAPTOP and command line.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.