Tuesday, March 24, 2009

How to Tunnel Through a School Firewall

Don't you hate it when you forget that paper or presentation for school? I know I do. When I'm at school and trying to read the latest articles over at Wired, I don't have time to retype any papers. I don't want to redo my homework, I just want to READ those articles dammit! Thats why I am on the computer in the first place! So if you are like me, and want your news (or facebook) now, then this is one blog post I would not suggest missing. Not that I suggest using this if your administrator's ban the use of connecting to remote terminals... (Although you can also use this trick with a few extra steps configuring Internet Explorer to view any website regardless of your school or offices security filters).

Basically what we are going to do is create whats called a Secure Shell (SSH) tunnel. An SSH tunnel is sort of like telnet, in that it will allow you to remotely connect to a server. In my case, the 'host server' is my home PC running Ubuntu-linux. And the computer I want to access from is, of course, my school computer running XP.

Setting up an SSH server on your host computer*
In linux, it is quite easy to set up an SSH server. Open up a terminal and type this command to install the OpenSSH package:

sudo apt-get install ssh

You will then be prompted for you password. Type in your password and hit enter (remember you will not see any characters displayed as you type your password). Thats all there is to it! Once going through the SSH Installation instructions, you need to set up your client computer (the one you want to connect from). To do this, we will use a program called Putty.

Installing Putty

This part is simple as well. All you need to do (for a windows client machine) is to download Putty. The download process is simple enough, all you need to do is follow the installation instructions. Once installed, open Putty.

In order to connect to your remote computer, you must know your IP address of the server computer. If your server is running linux, type "ifconfig" into your terminal window and find the ethernet IP address. If the server is running windows, type ipconfig and find the ethernet IP address. Once you have the servers address, you can use it to connect to that computer from the client.

In the screen that opens when you run Putty, type your host (server) computer's IP into the text field labeled (Host Name). Leave the port alone for now, as OpenSSH uses port 22 as the default port. Click open and Putty will try to open a connection with your server via SSH. If you are successful in connecting, you will be asked to provide a login name, followed by a password. If you input both correctly, you will see a linux command prompt (if the server is linux) that you can use as if you were at the actual computer. Enjoy!**

*The host computer in this case is running linux, but windows would work just as well. The installation process is all that would change.

**Please note that every command used from the remote terminal will be logged. It is also important to note that the way I have this configured, it will be fairly easy for an administrator to see you accessing an off-network computer. I will go into more detail later on how to try and get around this by using more obscure ports.

No comments: