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 want to tunnel data (HTTP / HTTPS) from one linux server through another to access proxies.

The reason I cannot go straight to the proxies is because they are all firewalled and I have far too many to whitelist. This is just a temporary setup to use the proxies.

So I want to go from point A to points C, D & E through point B (only B can access C, D & E). Any advice would be appreciated.

share|improve this question
    
Please specify the browser, and the linux distribution – elomage Feb 9 '14 at 21:54
    
No browser running python scripts, point A is CentOS point B is Ubuntu. – Daniel Pilch Feb 9 '14 at 22:09
    
For forwarding from any source, including from python scripts, make a SSH tunnel from localhost ports 80 and 443 to your middle server. – elomage Feb 9 '14 at 22:26

If the linux box has an ssh server, you can simply use an ssh tunnel to proxy http.

If the client is running Linux, run:

ssh -D 8080 user@linux_ssh_server

This will open port 8080 on the local host, and make it behave like a socks proxy, making everything sent to that port appear as if it was sent by the proxy. Set up localhost:8080 as a socks5 proxy in your browser and you're done.

On windows, the same can be achieved with putty (see tutorial here)

share|improve this answer

You may use simpleproxy program to pass any TCP traffic coming to one port on your pass-through server to a certain other host:port. Then on the client machine change the proxy settings in your browser to use the pass-through server.

Simpleproxy can be installed using apt-get on debian/Ubuntu:

sudo apt-get install simpleproxy

Example of simpleproxy synopsis is as follows, but look up man simpleproxy for more details:

simpleproxy  -L [<local host>:]<local port> -R <remote host>:<remote port> -S <proxy host>:<proxy port>
share|improve this answer

You must log in to answer this question.

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