Bring internet connection to ssh target machine via tunnel?

view full story

http://serverfault.com – 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 th (HowTos)