Killall-9.NET

Blog de David Sedeño

Tunelicemos, por TCP

Posted by David Sedeño Wed, 12 Apr 2006 06:13:00 GMT
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 comentarios | atom

Trackbacks

Use the following link to trackback from your own site:
http://www.killall-9.net/trackbacks?article_id=tunelicemos-por-tcp&day=12&month=04&year=2006

Comments

Leave a response

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

Leave a comment