Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 at 21:54
    
No browser running python scripts, point A is CentOS point B is Ubuntu. –  Daniel Pilch Feb 9 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 at 22:26

2 Answers 2

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.