Nice tip! I'll try it next time I need to see one of those intranet pages from my university...
, 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).
, 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.
, 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.
, Thu Nov 22 14:14:42 2007
how can i test if my tunnel is encrypting my http request?
, 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.
, 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?
, 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.
, 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!
, 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:
- Firefox envía su tráfico al puerto 9998.
- El tráfico recibido localmente en el puerto 9998 es enviado encriptado hacia el puerto local 22, a través del cliente de SSH.
- El tráfico local recibido en el puerto 22 es desencriptado y enviado desencriptado por la red por el dæmonio de SSH.
, 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!
, 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.
, Wed Dec 5 17:48:17 2007
Últimamente, veo a Alejandro más paranóico de lo normal... ha de ser culpa de Viralex.
, 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... :-/
, 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!
, Sun Jan 6 03:55:25 2008
I'm glad it worked for you! :-)
, 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.
, Fri Aug 1 00:08:36 2008
muy buen post, muy clarito y sencillo, funciona a la perfección!
, 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.
, 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.
, 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.
, Sat Jan 2 21:31:44 2010
Tunneling
You can use the software from http://www.interwap.ro . They have free access at 384kbps and low prices for up to 50mbps high speeds.
, Sun May 16 12:46:13 2010
Last update: 2010-05-16 (Rev 16834)


