I have a command-line application on linux that uses a specific port to talk to a remote server. Unfortunately, at work, that port is blocked.
I am able to connect my laptop via VNC to the network, and the laptop is on a wifi connection that does have port access to the remote server. I am able to ssh to my laptop from the secure network when it is connected.
Is there a way of using ssh port tunnelling to work around this? Can I port tunnel to my laptop and have my laptop act as a middle-man between the firewalled network and the remote server?
Firewalled Linux Box ---ssh---> Mac OSX Laptop ---wifi---> Remote Server
Some specifics:
- The command-line application is a wrapper to pip. The command line doesn't have the option to specify a proxy or an alternative ip/server for it to use.
- To my understanding, Pip might be communicating with a number of different servers, but most likely pypi.python.org.
- According to a source I found, Pip communicates over port 3128
I have tried the following:
ssh -v -f -4 -N -L 3128:pypi.python.org:3128 [email protected]
(The xx.x.xx.xxx is standing in for the laptop ip address)
When it runs, it says:
Remote connections from LOCALHOST:3128 forwarded to local address pypi.python.org:3128
That seems backwards to me, but I'm new to this so who knows! Either way, it doesn't seem to work. FYI, as a test I'm using:
telnet pypi.python.org 3128
to check to see if the firewalled machine now has access, but it doesn't.
Any thoughts?
telnet localhost 3128