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.
2 Answers
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 simpleproxyExample 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> 1 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_serverThis 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)