Routing HTTP traffic over SSH

2

I need to access the URL http://REMOTE:54000. My network does not allow outgoing connections on port 54000. However I have SSH access to a host "TRUSTED", which does not have any such restrictions. Is it possible to route the traffic to REMOTE on port 54000 through ssh on TRUSTED.

All hosts run some version of ubuntu

Midhat

Posted 2012-05-11T08:20:01.050

Reputation: 464

Answers

3

Set up a forwarding tunnel:

ssh -NL <localport>:REMOTE:54000 user@TRUSTED

then connect to localhost:localport to get to remote:54000. You'll need to figure out what localport you can use, or you can set it up as 80 and route all HTTP traffic through REMOTE that way (easiest way to get a HTTP proxy when you need it).

You can also install a local proxy as per: http proxy over ssh, not socks

roguesys

Posted 2012-05-11T08:20:01.050

Reputation: 2 640