AlmostVPN User Manual

previous
index
next

SSH Tunnel. What is this all about?

Let's imagine following scenario.  Your company runs private e-mail server on slidingpenguin and intranet web site on crawlingvarmint.
No SSH direct access
You (with your beloved PowerBook latte)decided to go to Starbucks for <place your favorite drink here>. While enjoying your coffenated drink, you feel urge to check your e-mail and do a few things on company's intranet web site. 15 seconds later nondescript gentleman, sitting with his PowerBook in the other corner of the coffee shop, had your e-mail login and password and was able to download strictly internal memo from your intranet. Could you've done any better? You should have used SSH.
Let's see how the very same scenario will look like if we introduce SSH server leapingrodent into the picture.
Access via SSH Tunnel
First thing to notice is that now we have to poke only one hole in the office firewall. Any network administrator (and Martha Stuart) will tell you that it is a "good thing".  Second thing to notice is that nondescript gentleman in the other corner got so upset that he spilled his coffee on his laptop and eventually was arrested for swearing in public place. So, what exactly SSH tunnel did for us?
SSH Local Tunnel
SSH client allocated POP3(110) port on latte. This port represents local end of the tunnel. Each network packet sent to this port gets tunneled to SSH server leapingrodent via secure tunnel and then gets forwarded to its final destination, POP3 port on slidingpenguin. So, if you configure your e-mail client to connect to localhost instead of slidingpenguin, then all exchange between your e-mail client and office e-mail server will go through the tunnel. Few things need to be mentioned before we will be ready to move forward.  First of all, port numbers on the remote and local ends of the tunnel do not have to be the same. You can configure SSH tunnel to connect port 60110 on your localhost with port 110 on slidingpenguin if you like.  You will have to tell your e-mail client to talk to port 60110 on localhost instead of standard port and then it is going to work as well as with port 110.  Secondly, it is possible to create tunnel that will work in other direction.
Remote Tunnel
In this configuration your friends from the office can point their browsers to port 888 on leapingrodent and end-up accessing web server on your laptop.


previous
index
next