Home‎ > ‎CIS 75‎ > ‎

Lab 3 - Proxying Ports

In this lab you will see how you can use SSH to proxy packets for you on the Internet. Proxying is a way of making packets that come from your machine appear to be coming from another. In some cases you can get around access restrictions by picking the right machine to be your proxy. In this case we will use opus. Your class VMs are protected from the Internet but they are able to be accessed by opus. This makes opus a useful as a proxy if you want to gain access to your VM from the internet. 

Setup
You will need to have an SSH program on your home machine. Linux and Mac OSX have an SSH client installed by default. On Windows you can use PuTTY. PuTTY is available for download here.

You will accessing a victim VM with the IP address 172.20.8.66

Setup the Proxy
The proxy is established when you login to opus using SSH. For this lab we will only be proxying one port from your machine to the victim machine. If you're using SSH on the command line, enter this command:

ssh -p 2220 -L 8080:172.20.8.66:80 <your_user_name_here>@opus.cis.cabrillo.edu

This command will work from home. If you're in Cabrillo's CIS lab you need to do this instead:

ssh -L 8080:172.20.8.66:80 <your_user_name_here>@opus.cis.cabrillo.edu

Notice that when in the CIS lab you connect on the default port (not 2220). In PuTTY setup a forwarded port using the GUI as shown below:


Once you have the fields filled in click the "Add" button and you will see the forward listed like this:


IMPORTANT: PuTTY does NOT remember your port forwards unless you save them explicitly in the home screen!

Use the Proxy to Browse the Server
If you have properly established a proxy you should be able to browse the following URL: 


Notice that URL appears to be YOUR machine. In fact it's a tunnel from your machine to the machine with IP address 172.20.8.66. If your tunnel is successful you will receive a secret number. Your number is unique to you don't share it! 

The page should look like this:



Turn In
Turn in your number on blackboard for credit. 

Grading
You will receive 15 points for a correct number. 


Comments