Killall-9.NET

Blog de David Sedeño

Tunelicemos, por TCP

Posted by David Sedeño 12/04/2006 at 08h13
Supongamos que tenemos una máquina Linux remota conectada a Internet a la que solo podemos acceder por ssh. Detrás de esta máquina tenemos un equipo al cual queremos acceder, digamos al puerto 80.

En nuestra máquina local vamos a montar un túnel con el Linux remoto con el siguiente comandito:

ssh -N -f -g -L80:ip_publica_linux_remoto:1111 usuario@ip_publica_linux_remoto

Con esto estamos diciendo que el puerto local 80 estará "tunelizado" al puerto 1111 de la máquina remota.

Ahora bien, el puerto 1111 en el Linux remoto tenemos que redirigirlo a la máquina destino. Para ello, se puede usar rinetd, una pequeña utilidad que hace redirecciones de puertos tcp. Simplemente hay que configurar el fichero /etc/rinetd.conf con:

ip_publica_linux_remoto 1111 192.168.1.20 80

Suponiendo que la ip del equipo destino sea la 192.168.1.20.

Ahora accedemos con el navegador al puerto 80 de nuestra máquina local y estaremos accediendo al puerto 80 de la ip privada de la red remota a través del túnel que hemos montado.

Como Nota final, también se puede hacer teniendo el Linux remoto ip privada y por ejemplo redirigido el puerto ssh en el router de conexión a internet.

Próximo capítulo: Tunelicemos, por UDP

37 comments |

Trackbacks

Use the following link to trackback from your own site:
http://www.killall-9.net/trackbacks?article_id=26

  1. Currier And Ives Dinnerware
    26/05/2006 at 14h54
    I use Firefox in Ubuntu.
  2. Vino Chiusa Grande Bianco
    26/05/2006 at 20h25
    I'm working :(
  3. Seether Determined Under
    27/05/2006 at 13h58
    Thanks...
  4. Villaggio E Campeggio
    29/05/2006 at 14h13
    Thats correct!
  5. Levitra Cialis Cheap
    30/05/2006 at 00h34
    Good idea!
  6. Gator Stock Endocarp Bulls
    01/06/2006 at 07h34
    I think it would be usefull for other users also...
  7. Photo Of Micro Braids
    01/06/2006 at 17h52
    I use Firefox in Ubuntu...
  8. Us Politics Jobs
    03/06/2006 at 08h29
    I thout to do it in my local version :(
  9. Luminox Plunk Watch
    03/06/2006 at 19h52
    Well at last catched the problem :)
  10. Arakawa Photo
    03/06/2006 at 23h54
    I think it would be usefull for other users also :)
  11. Pennsylvania Lottery Repair
    04/06/2006 at 03h51
    The problem is my browser.
  12. Tweeter Center Young Jersey
    04/06/2006 at 06h04
    Thats correct :)
  13. Medicare Prescription Help
    05/06/2006 at 18h26
    Very clear :)
  14. Chinchy Dexatrim
    06/06/2006 at 07h54
    Thanks. Updated appropriately!
  15. Biglietto D Augurio 18 Anno
    06/06/2006 at 11h47
    Very clear!
  16. Screensaver Take Comico
    06/06/2006 at 21h34
    Well at last catched the problem :(
  17. Deposit Bonus Poker
    08/06/2006 at 00h04
    Gonna have to give it a try!
  18. Picture Mpg Ideal Silvia
    08/06/2006 at 04h07
    Thanks!
  19. Bloomington Peoria Pinksheets
    08/06/2006 at 14h04
    Thanks for taking the time to do it :(
  20. Gonna have to give it a try :(
  21. Prick Northward Semen Shot
    08/06/2006 at 17h53
    I'm working!
  22. Gucci Suits
    10/06/2006 at 04h46
    Not really new...
  23. Astrology Tucson Arizona
    10/06/2006 at 06h45
    Thanks.
  24. Isola D Elba Appartamento
    11/06/2006 at 05h57
    There is some strange behaviour with this :)
  25. Celebrity Century
    11/06/2006 at 13h18
    There is some strange behaviour with this.
  26. Thats correct :)
  27. California Fille Swimsuit Models
    12/06/2006 at 06h26
    That is strange.
  28. Retractable Clothes Line
    13/06/2006 at 02h38
    Thanks for the write-up :)
  29. I use Firefox in Ubuntu!
  30. Morrowind Plugins
    17/06/2006 at 04h51
    Good idea :(
  31. That is strange :(
  32. Cayenne Als Scan
    18/06/2006 at 17h22
    Thanks for the write-up :)
  33. Social Science Degree
    19/06/2006 at 03h31
    Just thought I'd make a note about a problem :)
  34. Stop Spam
    19/06/2006 at 05h40
    I'm working!
  35. Progressed Astrology Charts
    19/06/2006 at 16h15
    There is some strange behaviour with this :)
  36. Cozaar Side
    19/06/2006 at 16h23
    Good idea!
  37. Very clear!