Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server which is connected to the Internet through a proxy and another PC, without internet connection but with access to this server through SSH. And what is needed - connect the PC to the internet using SSH. I've found that ssh -2 -C -D 4567 username@example.tld creates a SOCKS4/5 proxy at, and it seems to be working. But in my situation, i'd need to chain one more proxy: the one through which the server connects to the internet. I haven't found any possibility to specify a chain of proxies, so what are the alternatives? What's the (easiest?) way to do this?

share|improve this question
Is this the layout you are trying to describe? Your PC -> an SSH server -> a proxy -> teh interwebs . Is the proxy a regular internet proxy or another SSH server? – Freiheit Sep 21 '12 at 17:29
Yes, it's true. The proxy is a regular HTTP proxy. – aplavin Sep 21 '12 at 17:55
up vote 1 down vote accepted

Tell SSH to forward all requests to your local port 8080 over the other pc to the proxy-server:

ssh -N -L 8080:<proxy-server-ip>:<proxy-service-port> username@example.tld

Now set your local proxy-settings to localhost port 8080

share|improve this answer
Thanks, this really solve the problem! – aplavin Sep 21 '12 at 18:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .