Bring internet connection to ssh target machine via tunnel?

Posted by Calvin on Server Fault See other posts from Server Fault or by Calvin
Published on 2012-10-30T23:52:10Z Indexed on 2012/10/31 5:07 UTC
Read the original article Hit count: 509

Filed under:
|
|
|
|

I have a CentOS 5 machine deep inside firewalls that's only reachable via ssh on an unconventional port, let's say 98765. I normally connect to this machine like this: ssh -P 98765 user@ip -L5900:localhost:5900

I need to run yum to install some packages on this machine, but it's not possible since the outbound ports are all closed on this machine.

I want to do something like this to "bring my internet connection" to this machine:

ssh -P 98765 user@ip -L5900:localhost:5900 -R80:localhost:80 -R21:localhost:21

My intention is that, when I run yum on the machine, yum will use port 80 and 21 through my originating machine.

Is something like this even possible?

© Server Fault or respective owner

Related posts about ssh

Related posts about internet