ssh tunnel

5
Accessing the IITB internal network from outside Manish Goregaokar November 4, 2012 1 Making the Tunnel 1.1 Windows First, download putty.exe from here. Now, run putty.exe, and do the following: 1. Under the Session menu (a) Host name: login.iitb.ac.in (b) Port: 5022 (c) Connection type: SSH 1

Upload: rohit-ranjan

Post on 13-Apr-2015

49 views

Category:

Documents


8 download

DESCRIPTION

way to tunnel to private(iitb) network

TRANSCRIPT

Page 1: Ssh Tunnel

Accessing the IITB internal network fromoutside

Manish Goregaokar

November 4, 2012

1 Making the Tunnel

1.1 Windows

First, download putty.exe from here.Now, run putty.exe, and do the following:

1. Under the Session menu

(a) Host name: login.iitb.ac.in

(b) Port: 5022

(c) Connection type: SSH

1

Page 2: Ssh Tunnel

2. Under SSH>Tunnels

(a) Source port: 8888 (or whatever you like, just enter the sameonein the proxy settings)

(b) Select Dynamic and Auto

(c) Click Add. If done correctly, It should show D8888 in the boxabove.

2

Page 3: Ssh Tunnel

3. If you wish, you may save these settings by going back to the Sessionmenu, typing some name under ”saved sessions”, and clicking ”Save”.Next time you open PuTTY, select the entry in the menu below, andclick Load (THis way, you don’t have to enter the setting in steps 1and 2 over and over again).

4. Now, click ”Open”

5. After a breif wait, it will ask you for a username. Enter secure. Thepassword is extvoxacc.

6. It will ask you which server you want to log on to (If you have amars/OSL id, select mars and log on with that–but this isn’t necessary,all it will do is give you an internal terminal to use). Ignore it, just

3

Page 4: Ssh Tunnel

keep the PuTTY window open, and go to the section on configuringFirefox below:

1.2 Ubuntu

1. Open a terminal window (Ctrl-Alt-T)

2. type ssh -D 8888 login.iitb.ac.in:5022

3. login with username secure and password extvoxacc

4. Leave the terminal open, and proceed to the section on configuringfirefox.

2 Configuring Firefox

1. In Firefox, open Options, and go to Advanced>Network>Connection>Settings.Click ”Manual Proxy configuration” and add 127.0.0.1 as SOCKShost, with port 8888 (or whatever you entered in step 2(a) (Win-dows)/step 2 (Ubuntu).

4

Page 5: Ssh Tunnel

Unfortunately, this only lets one access internal sites via IIT. If youwant both to work, do the following:

(a) Download this file (alternate link), and save it somewhere locally.

(b) Find out the location of the file. It may be something like C:/Users/Manish/Desktop/iittunnel.pac(Or /Desktop/iittunnel.pac on Ubuntu). If you want to findout the directory it’s in, right-click on it, select ”Properties” andthere’will be a row called ”Location”. Append ”iittunnel.pac” toit and you should be OK.

(c) Go to Advanced>Network>Connection>Settings, select ”Auto-matic proxy configuration URL”, and enter the location you foundout in the previous step in the text box. Click OK, and close theoptions menu.

2. Now, go to about:config in Firefox (enter it in the URL bar). Type”socks” in the search bar, and set network.proxy.socks remote dns

to true by double-clicking on it (it should become bold).

To restore Firefox to its previous state, go to Advanced>Network>Connection>Settings,and select ”No proxy” (or revert to your normal proxy settings if you haveany). Then, do step 2 again, but set the row to false this time

5