You are not logged in.

#1 2011-08-11 23:22:53

Rimas
Member
Registered: 2006-12-10
Posts: 19

[SOLVED] Encrypted Socks Tunnel with SSH

many people use command

$ ssh -ND 8080 user@host

to protect internet traffic by tunneling to a safe location (like home server).
This should be done from client side and after connection is established, one can use localhost:8080 as a proxy server in web browser.
The question is following: is it possible to reverse direction of tunnel initiation? That is, establishing tunnel from the server side (with autossh for example) and then, similarly to above example, using localhost:8080 on the client side as a proxy?
Or should I run something as polipo on a server and then use simple tunneling with -R switch?

Last edited by Rimas (2011-08-13 22:14:24)

Offline

#2 2011-08-12 03:22:29

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,693

Re: [SOLVED] Encrypted Socks Tunnel with SSH

Yes, and it is called ssh reverse tunneling.  Google has sever good links based on that search term.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2011-08-12 21:34:11

Rimas
Member
Registered: 2006-12-10
Posts: 19

Re: [SOLVED] Encrypted Socks Tunnel with SSH

Thank you, ewaller.
Actually I did tunneled proxy once by establishing first reverse tunnel, like

$ ssh -qNnT -R 3333:localhost:22 mydomain.com 

and then on client side

$ ssh -p 3333 -D 8888 localhost 

but I'm not sure about how -D switch actually works and if it possible to introduce it somehow into first command to make tunnel and proxy forwarding simultaneously.

Offline

Board footer

Powered by FluxBB