Geek: SSH Tunneling fun
Wednesday, January 30, 2013
I have a home VPN set up at home. Which is obviously the elegant, and secure way of connecting to my home network.
I'm pretty sure I mentioned about SSH tunneling sometime ago, how it's considered as a "poor man's VPN". What it does is simply create an SSH connection, then tell my computer "Hey, here's a secure connection, please throw whatever packets you have at it."
The end result is something similar to a SOCKS5 proxy, which is technically what it is.
What I experimented today in school is doing VNC over SSH, which technically isn't very difficult if you're on Linux, but it's a little more hairy on Windows. Thankfully there are already tons of guides out there so it really isn't that hard.
However, as it's still under the advanced section, I shall draw a diagram, to help myself understand.
The BLUE refers to my SSH connection to 1 of my routers. Here, I could have set up a tunnel that I could push my web traffic through. (a single port)
The GREEN is the interesting part. I am using the blue connection to tell the router, "Hey, I need to talk to that computer at home, set up a link between a port on my home computer, and a port on my laptop." (but the router doesn't know it's doing that)
The ORANGE refers to the actual path of the traffic.
I would point to the defined port on my locahost, and it will be redirected to my computer at home as it is "linked". However, my green connection is still encapsulated within my blue connection. So it's kind of like a tunnel within a tunnel.
And with that, I would've finish setting up a VNC connection to my home computer through a SSH tunnel. I tried it with FTP but I screwed something up and kept getting request time-outs. I'll fix it tomorrow though.
Yes, there is a practical application. I did a test run on my FYP project using this link in school. The end.