Tiernan's Comms Closet

Geek, Programmer, Photographer, network egineer…

SSH Tunneling made simple

Something I do on a regular basis is use the internet while “out and about”. This could be college, which has a semi open network, or it could be a coffee shop, which also usually has a semi open connection. There is also the possibility of using the a mobile internet connection on my iPhone, which can be slow, but at least its only shared with me… Anyway, over on RevSys.com, there is a post SSH Tunneling made simple which shows you how to open an SSH tunnel to your machine somewhere else (could be at home, as is my case, or a VPS/Dedicated server somewhere, or even on Amazon…) and use that for different things… In the case he shows, its for SMTP access. For my case, i am forwarding my local port 3128 to my Microsoft TMG 2010 Server in house on port 8080. Then my system proxy on my laptop is set to use localhost:3128 for all web and HTTPS requests. Very handy. One other tip: Using the -C flag, so your command may look like:

ssh yourname@remotemachine -L 3128:remoteMachine:8080 -C

will compress data between you and the SSH server, which for basic web browsing (HTML, CSS, JS) will make things faster, but for stuff like images, etc, may not work so well… Your Mileage may Vary…

Also, while on the subject of SSH, Linux Journal has an article on Eleven SSH tricks which mentions compression, Encryption Cyphers, X11 Forwarding, Config files and other interesting bits.


This site is hosted on my own ASN on AS204994. More details about that over there. I also use Vultr for transit services and HostUs for LIR Services. Check them out. You can also check some of the gear I use on a daily basis over on kit.co/tiernano. Looking for a Backup Option? Check out Backblaze and get a month free.

Leave a Reply

Your email address will not be published. Required fields are marked *