EmailContentTagsPostHistory

Nice tip! I'll try it next time I need to see one of those intranet pages from my university...

Save to del.icio.usSubmit Story to Digg

tagae, Sun Sep 30 13:08:03 2007


Here is a description for the same solution under linux:

http://kuscsik.blogspot.com/2007/01/how-to-create-dynamic-ssh-tunnel-and.html

To resolve the DNS address you don't need to install a proxy. You just need to set the vaule network.proxy.socks_remote_dns = true in about:config. (write about:config as an address in the firefox browser).

Save to del.icio.usSubmit Story to Digg

Anonymous, Wed Oct 17 09:54:29 2007


Eh? This is exactly what I described... who said you needed to install a proxy? My solution obviously works under Linux, which is what I always use anyways.

Save to del.icio.usSubmit Story to Digg

azul, Thu Oct 18 00:20:11 2007


Great. Very useful to read your webmail from an untrusted network. I'm going to try to use it whenever I'm not at home.

Save to del.icio.usSubmit Story to Digg

gresco, Thu Nov 22 14:14:42 2007


how can i test if my tunnel is encrypting my http request?

Save to del.icio.usSubmit Story to Digg

Anonymous, Wed Nov 28 21:35:38 2007


Well, the best way would probably to run Wireshark or tcpdump and monitor all your traffic. Another way would be to use your operating system's netstat to verify that the only connection from your laptop/desktop is the one to the port 22 of your SSH server.

Save to del.icio.usSubmit Story to Digg

azul, Thu Nov 29 20:48:32 2007


Ya puse el tunel hice el setup en firefox y cuando reviso el log en wireshark, puedo ver todas las direcciones a las que entre en mi navegador, ejemplo:

19.388058 | 192.168.5.217 | 64.34.172.189 HTTP | GET /weblogs/azul/firefox-ssh-tunnel HTTP/1.1
GET /weblogs/azul/firefox-ssh-tunnel HTTP/1.1\r\n
Request Method: GET
Request URI: /weblogs/azul/firefox-ssh-tunnel
Request Version: HTTP/1.1
Host: wiki.freaks-unidos.net\r\n

No deberia estar eso encriptado? pense q la idea de pasar todo por el tunel ssh es q con un analizador de trafico no se viera a q websites entro, estoy equivocado?

Save to del.icio.usSubmit Story to Digg

Anonymous, Fri Nov 30 17:23:15 2007


Estás seguro de que ejecutaste Wireshark en la máquina en la que ejecutas el cliente de SSH y Firefox y no en el servidor de SSH?

Tu captura pareciera indicar que el tráfico de Firefox de 192.168.5.217 no está siendo encriptado.

Save to del.icio.usSubmit Story to Digg

azul, Fri Nov 30 18:40:08 2007


Si, estoy en la misma maquina... y se que el firefox esta navegando a traves del tunel porque cuando tumbo el servicio de ssh el firefox no me navega...

Aunque ahora revisando los puertos descubri algo... yo para activar el tunel uso el siguiente comando:

ssh -ND 9998 localhost

y mirando los puertos abiertos de mi maquina tengo esto:

Protocol:[TCP]	
Program [PID]: ssh.exe [784]
State: Listening
Local Address: 127.0.0.1 (localhost)
Port: 9998
Remote Address: 0.0.0.0
Port: 0
Path and File: C:\Cygwin\bin\ssh.exe	

Pero tengo otro puerto que si parece tener actividad:

Protocol:[TCP]	
Program [PID]: ssh.exe [784]
State: Established
Local Address: 192.168.5.217
Port: 4398
Remote Address: 192.168.5.217
Port: 22 ssh
Path and File: C:\Cygwin\bin\ssh.exe	

Lo unico que no entiendo es porque el puerto local es 4389... imagino que deberia ser 9998, no se si este equivocado, no se mucho de esto. Por cierto gracias por tu respuesta!

Save to del.icio.usSubmit Story to Digg

Anonymous, Fri Nov 30 20:19:44 2007


Hay algo mal con esta línea:

ssh -ND 9998 localhost

El tráfico será encriptado entre tu cliente y el servidor al que te conectes a través de SSH. Si te conectas a localhost, únicamente estás encriptando el tráfico de manera local, pero abandonará tu máquina de forma desencriptada.

El segundo puerto en el que ves actividad símplemente corresponde a la conexión local, desde el puerto 4389 hacia el puerto 22. Básicamente tienes esto:

Save to del.icio.usSubmit Story to Digg

azul, Sat Dec 1 03:00:18 2007


Ya te entendi, gracias! pero ahora mi duda es, cual seria la linea correcta para que funcione?

ssh -N -f -D 9998 dereck@blue

Siendo dereck mi usuario y blue mi maquina... (yo pensaba que escribir localhost era lo mismo ya que tambien me pedia usuario y contraseña)

Gracias por tu ayuda!

Save to del.icio.usSubmit Story to Digg

Anonymous, Wed Dec 5 13:42:35 2007


La línea correcta sería

ssh -fND localhost:9998 dereck@blue

, asumiendo que blue es la máquina donde se ejecuta tu servidor de SSH (que debe ser diferente a la máquina donde estás ejecutando Firefox). El tráfico de Firefox será encriptado entre la máquina donde estás ejecutando Firefox y blue.

Save to del.icio.usSubmit Story to Digg

azul, Wed Dec 5 17:48:17 2007


Últimamente, veo a Alejandro más paranóico de lo normal... ha de ser culpa de Viralex.

Save to del.icio.usSubmit Story to Digg

Alfabravo, Thu Dec 27 18:18:03 2007


Umm, bueno, a decir verdad la mayoría de las veces que uso el túnel lo hago no tanto para encriptar mi tráfico en la red local sino más para poder tener acceso a una red remota a la que sólo puedo entrar por SSH... :-/

Save to del.icio.usSubmit Story to Digg

azul, Thu Dec 27 20:50:26 2007


Thanks for the great tutorial! I had setup a tunnel with SSH, and was feeling pretty good... until I put a packet sniffer on it and saw all that unsecure DNS traffic. I use Firefox (standalone version) with the tunnel and Internet Explorer for standard work network traffic. So, your tip on configuring Firefox really saved me a lot of time!

Save to del.icio.usSubmit Story to Digg

kuma-sam, Sun Jan 6 03:55:25 2008


I'm glad it worked for you! :-)

Save to del.icio.usSubmit Story to Digg

azul, Mon Jan 28 08:13:43 2008


Thanks for the tips! It might be worth noting that, at least with FF3, you need to restart your browser for the network.proxy.socks_remote_dns setting to take effect.

Save to del.icio.usSubmit Story to Digg

Anonymous, Fri Aug 1 00:08:36 2008


muy buen post, muy clarito y sencillo, funciona a la perfección!

Save to del.icio.usSubmit Story to Digg

daniel remeseiro, Sun Aug 17 15:49:28 2008


Ending the tunnel

What is the recommended way to end the tunnel once it's established? I just killed the ssh process, but that seems a bit crude.

Save to del.icio.usSubmit Story to Digg

Anonymous coward <nobody>, Fri Jan 16 18:20:25 2009


Updated the document

I've just updated the document with a bit more info based on the questions posted here. Thanks for the feedback.

Save to del.icio.usSubmit Story to Digg

azul <nobody>, Sun Mar 29 22:16:28 2009


Simple Commercial Solution

Great article and spot on. Privacy is a huge concern these days. If anyone is interested, I use a fairly new commercial solution called Lockfox that bundles all this for the 'common' man. http://www.lockfox.com

The service is cheap and the network pretty fast for my needs. Everything is bundled into a firefox browser package.

Save to del.icio.usSubmit Story to Digg

Anonymous <nobody>, Sat Jan 2 21:31:44 2010

Comment:

Subject:

Identity

Author:

Spam control

5 + 3:

Email address

Enter your email address to subscribe to this page. Your address will be shown to other users.

Address (optional):

Last update: 2010-01-02 (Rev 16604)

svnwiki $Rev: 15576 $