User Tools

Site Tools


informatica:linux:tunel

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
informatica:linux:tunel [2012/06/21 13:15] javiinformatica:linux:tunel [2014/08/29 10:47] – [Tunel simple] javi
Line 1: Line 1:
 ====== ssh tunel ====== ====== ssh tunel ======
 +Mas info: http://www.vicente-navarro.com/blog/2009/05/24/creando-tuneles-tcpip-port-forwarding-con-ssh-los-8-escenarios-posibles-usando-openssh/
 +
  
 ssh tunel tunnel -L ssh tunel tunnel -L
 +
 +
 +
 +===== Tunel entre solo dos maquinas =====
 +
 +Direcciones IP:
 +
 +| A | nuestra maquina |
 +| B | 192.168.1.2 |
 +
 +Conectividad:
 +
 +  A -> B TCP 22 (SSH)
 +
 +Objetivo:
 +
 +  A -> B TCP 8080
 +
 +Solucion:
 +
 +  ssh -L 8080:localhost:8080 usuario@192.168.1.2
 +
 +Prueba:
 +
 +  http://localhost:8080
 +  
 +Nos estaremos conectando al puerto TCP 8080 de la maquina B
  
 ===== Tunel simple ===== ===== Tunel simple =====
 +
 +Direcciones IP:
 +
 +| A | nuestra maquina |
 +| B | 192.168.1.2 |
 +| C | 192.168.1.1 |
  
 Conectividad:  Conectividad: 
Line 16: Line 51:
 Solucion: Solucion:
  
-  ssh -L 8081:192.168.1.1:80 usuario@maquina_B+Lanzar desde nuestra maquina: 
 + 
 +  ssh -L 8081:192.168.1.1:80 usuario@192.168.1.2 
 + 
 +Si nos conectamos a localhost:8081 nos estamos conectando a 192.168.1.1:80 (Maquina C) a traves de 192.168.1.2:22 (Maquina B) 
 + 
 +Si el servicio ssh en C escucha en otro puerto: 
 + 
 +  ssh -p PUERTO -L 8081:192.168.1.1:80 usuario@192.168.1.2
  
-  * La direccion IP de C es 192.168.1.1 
-  * Si nos conectamos a localhost:8081 nos estamos conectando a C:80 a traves de B:22 
  
 ===== Doble tunel ===== ===== Doble tunel =====
informatica/linux/tunel.txt · Last modified: 2015/04/13 20:19 by 127.0.0.1