ssh-tunnel

JSON

rev 26  |  foxhop  |  1373379859000  |  JSON

rev 25
rev 26
206206
207   .. code-block:: bash207   .. code-block:: bash
t208    t208 
209    # -g means gateway -R means remote port forwarding
210    # prompt:~$ ssh -g -R <remote-port>:<localhost>:<local-port> <user>@<remote-
 >host>
209    user@joe:~$ ssh -g -R 8888:127.0.0.1:8888 user@mary211    user@joe:~$ ssh -g -R 8888:127.0.0.1:8888 user@mary
210212
rev 25  |  foxhop  |  1373379368000  |  JSON

rev 24
rev 25
66~~~~~~~~~~~~~~~~~~~~~~~~~~~~~66~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6767
n68The remotehost SSH server doesn't need to be configured.  n68The remotehost just needs to have an SSH server installed, no configuration is n
 >eeded.  
6969
n70Just be sure its installed and running and that you have credentials to login. In70This server could be running anywhere on the internet, we just need credentials 
>t just needs to be installed and running and you just need credentials.>to login.
7171
n72To install openSSH-server on Debian or Ubuntu linux type:n72To install openssh-server on Debian or Ubuntu linux type:
7373
n74.. code-block:: apachen74.. code-block:: bash
7575
t76 sudo apt-get install ssht76 sudo apt-get install openssh-server
77  77  
78When I'm at work, I establish an SSH Tunnel to my remotehost webserver at home. 78When I'm at work, I establish an SSH Tunnel to my remotehost webserver at home. 
> > 
rev 24  |  foxhop  |  1373379163000  |  JSON

rev 23
rev 24
26**Can a network admin stop a person or computer from tunneling?**26**Can a network admin stop a person or computer from tunneling?**
27 27 
t28 The Admin will typically not know about the tunnel.  From his view a tiny connet28 The Admin will typically not know about the tunnel.  From his view a tiny conne
>ction is being placed and is normally overlooked.  The admin does have the abili>ction is being placed and is normally overlooked.  The admin does have the abili
>ty to block the default SSH port 22.  You can build your tunnel over any port (p>ty to block the default SSH port 22.  You can build your tunnel over any port (8
>ort 80 or 443). >0 or 443). 
2929
30Article Scope30Article Scope
rev 23  |  foxhop  |  1373379153000  |  JSON

rev 22
rev 23
26**Can a network admin stop a person or computer from tunneling?**26**Can a network admin stop a person or computer from tunneling?**
27 27 
t28 The Admin will typically not know about the tunnel.  From his view a tiny connet28 The Admin will typically not know about the tunnel.  From his view a tiny conne
>ction is being placed and is normally overlooked.  The admin does have the abili>ction is being placed and is normally overlooked.  The admin does have the abili
>ty to block the default SSH port 22.  You can build your tunnel over any port.>ty to block the default SSH port 22.  You can build your tunnel over any port (p
 >ort 80 or 443). 
2929
30Article Scope30Article Scope
rev 22  |  foxhop  |  1373379019000  |  JSON

rev 21
rev 22
8**My Story** 8**My Story** 
99
t10 My place of employment has a firewall and it blocks nearly all outbound protocot10 My place of employment has a firewall and it blocks nearly all outbound protoco
>ls and many great sites. (such as foxhop.net, icodeviruses.com, or youtube.com).>ls and many great sitessuch as foxhop.net or youtube.com.  I need a way to get
>  I needed a way to get around the blocks and not get caught.> around the blocks and not get caught.
1111
1212
rev 21  |  foxhop  |  1373378591000  |  JSON

rev 20
rev 21
209    user@joe:~$ ssh -g -R 8888:127.0.0.1:8888 user@mary209    user@joe:~$ ssh -g -R 8888:127.0.0.1:8888 user@mary
210210
t211#. When the tunnel opens, verify that mary is binding/listneing to 0.0.0.0:8888:t211#. When the tunnel opens, verify that mary is binding/listening to 0.0.0.0:8888:
212212
213   .. code-block:: bash213   .. code-block:: bash
rev 20  |  foxhop  |  1373378426000  |  JSON

rev 19
rev 20
186186
187network.proxy.socks_remote_dns  user set   boolean   true187network.proxy.socks_remote_dns  user set   boolean   true
tt188 
189 
190Remote tunnel a service
191=========================
192 
193In this scenario we are running a development web server (port 8888) on our work
 >station (joe) from our home network.
194We would like to grant access to this development web server to people on the wo
 >rk network. We have ssh access
195to a host (mary) on the work network.
196 
197#. We must enable GatewayPorts in mary:/etc/ssh/sshd_config to allow binding to 
 >0.0.0.0 instead of 127.0.0.1:
198 
199   .. code-block:: config
200 
201    # Allow this host to bind forwarded ports to 0.0.0.0 instead of 127.0.0.1
202    # Service will appear to run on this host, but will get forwarded over tunne
 >
203    GatewayPorts yes
204 
205#. We create a remote port forwarding tunnel from joe to mary:
206 
207   .. code-block:: bash
208    
209    user@joe:~$ ssh -g -R 8888:127.0.0.1:8888 user@mary
210 
211#. When the tunnel opens, verify that mary is binding/listneing to 0.0.0.0:8888:
212 
213   .. code-block:: bash
214 
215    user@mary:~$ sudo netstat -nap | grep 8888
216    tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN  
 >    17921/0         
217    tcp6       0      0 :::8888                 :::*                    LISTEN  
 >    17921/0  
218    
219**Now people at work can access the home workstation web server running on joe b
 >y connecting to \http://mary:8888 !**
rev 19  |  foxhop  |  1346384601000  |  JSON

rev 18
rev 19
179179
180Then open vnc and point to 127.0.0.1:31338 or 127.0.0.1:31337180Then open vnc and point to 127.0.0.1:31338 or 127.0.0.1:31337
tt181 
182Tunnel DNS requests in firefox
183===================================
184 
185about:config
186 
187network.proxy.socks_remote_dns  user set   boolean   true
rev 18  |  foxhop  |  1335478547000  |  JSON

rev 17
rev 18
8**My Story** 8**My Story** 
99
t10 My place of employment has a firewall and it blocks nearly all outbound protocot10 My place of employment has a firewall and it blocks nearly all outbound protoco
>l and many great sites. (such as foxhop.net, icodeviruses.com, or youtube.com). >ls and many great sites. (such as foxhop.net, icodeviruses.com, or youtube.com).
> I needed a way to get around the blocks and not get caught.>  I needed a way to get around the blocks and not get caught.
1111
1212
rev 17  |  foxhop  |  1335478510000  |  JSON

rev 16
rev 17
8**My Story** 8**My Story** 
99
t10 My place of employment has a bastard firewall and it blocks nearly all ports ant10 My place of employment has a firewall and it blocks nearly all outbound protoco
>d many great sites. (such as foxhop.net, icodeviruses.com, or youtube.com).  I n>l and many great sites. (such as foxhop.net, icodeviruses.com, or youtube.com). 
>eeded a way to get around the blocks and not get caught.> I needed a way to get around the blocks and not get caught.
1111
1212
rev 16  |  foxhop  |  1331132042000  |  JSON

rev 15
rev 16
136.. code-block:: bash136.. code-block:: bash
137137
t138 ssh -ND 7070 user@remotehost_ipt138 ssh -D 7070 user@remotehost_ip
139139
140You will be prompted for credentials on the remotehost.  140You will be prompted for credentials on the remotehost.  
rev 15  |  foxhop  |  1289339965000  |  JSON

rev 14
rev 15
t1rymMyO  <a href="http://ccfdfrkqyubk.com/">ccfdfrkqyubk</a>, [url=http://cgtazrwt1SSH Tunnel for HTTP Traffic
>htfgg.com/]cgtazrwhtfgg[/url], [link=http://cxrmntdtgsvz.com/]cxrmntdtgsvz[/link 
>], http://rwlmlnhtyvae.com/ 
2==============================
3 
4**Are You stuck behind a firewall?**
5 
6 Does your school, library, work, or parents control where you surf and what por
 >ts you have open? Do you surf on such public domains and need more privacy? Are 
 >you sick of failing proxies? If you answered 'Y' to any of these questions then 
 >this tutorial is for you.
7 
8**My Story** 
9 
10 My place of employment has a bastard firewall and it blocks nearly all ports an
 >d many great sites. (such as foxhop.net, icodeviruses.com, or youtube.com).  I n
 >eeded a way to get around the blocks and not get caught.
11 
12 
13 
14.. contents:: Sections 
15 
16Common Questions
17-------------------
18**What is the best way to get around a firewall?** 
19 
20 Create an SSH tunnel from the work network to your home network.
21 
22**My network administrator is smart, will I get caught?**
23 
24 No, you will most likely not get caught.  All the firewall sees is a connection
 > to a resource on the internet.  When you browse the web using the tunnel all tr
 >affic is encrypted.  If a network administrator captured packets he would only g
 >et garbage data.  An SSH tunnel is basically a VPN between two computers or netw
 >orks.  1337     
25 
26**Can a network admin stop a person or computer from tunneling?**
27 
28 The Admin will typically not know about the tunnel.  From his view a tiny conne
 >ction is being placed and is normally overlooked.  The admin does have the abili
 >ty to block the default SSH port 22.  You can build your tunnel over any port.
29 
30Article Scope
31-------------------
32 
33.. _Putty.exe: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
34.. _Firefox: http://portableapps.com/apps/internet/firefox_portable
35 
36We will discuss the steps of building an SSH Tunnel for HTTP traffic between two
 > computers on different networks.  This guide will cover both windows and linux 
 >localhosts.
37 
38Throughout this guide I will use the following terms, here are the definitions:
39 
40*localhost*
41 The computer at work or school.
42*remotehost*
43 The computer or server that is offsite, which has the SSH server running.
44 
45**What you need ...**
46 
47#. Credentials to a remotehost running an SSH server. (openssh-server)
48#. A localhost computer crippled by a pesky network firewall.
49#. An SSH client, For windows get Putty.exe_
50#. Firefox_ ( Portable is best )
51 
52**Why is this the best method?**
53 
54#. Most of the configuration is done from the localhost (while at school or work
 >).
55#. You don't need admin rights to run Putty.exe_, just place it on a USB drive.
56#. You don't need admin rights to run Firefox_ Portable, just place it on a USB 
 >drive.
57#. No changes need to be made on the remotehost ssh server.
58 
59 
60SSH Tunnel created from a Windows localhost
61-----------------------------------------------
62 
63Follow this guide if your localhost (school or work) computer is Windows based.
64 
65Configure the SSH Server
66~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67 
68The remotehost SSH server doesn't need to be configured.  
69 
70Just be sure its installed and running and that you have credentials to login. I
 >t just needs to be installed and running and you just need credentials.
71 
72To install openSSH-server on Debian or Ubuntu linux type:
73 
74.. code-block:: apache
75 
76 sudo apt-get install ssh
77  
78When I'm at work, I establish an SSH Tunnel to my remotehost webserver at home. 
 > 
79 
80Keep in mind that this doesn't have to be your server, you just need credentials
 > for SSH. 
81 
82 
83Configure the SSH Client
84~~~~~~~~~~~~~~~~~~~~~~~~~~~
85#. Download Putty.exe_ if you haven't already, you should follow along.
86 
87#. Double click Putty.exe_.
88 
89   .. image:: http://engineer.siue.edu/puttyConnectScreen.gif
90 
91#. The 'Host Name (or IP address)' box should point to the SSH enabled remoteser
 >ver. 
92 
93#. Toggle the SSH radio button to set the port to 22. (The native SSH port). 
94 
95#. Type a name into the 'Saved Sessions' box to save all the settings we toggle.
96 
97#. Click the save button.
98 
99#. There is a list of categories to the left of the putty window.
100 
101#. Navigate to: ( Connection > SSH > Tunnel )
102 
103#. You should be at a menu that is labeled 'Options controlling SSH port forward
 >ing'.
104    
105#. Click the 'Dynamic' radio button. 
106 
107#. Leave 'Destination' text box blank.
108 
109#. Type '7070' into the 'Source port' text box.
110 
111#. Click the 'Add' button.
112 
113#. Save your configuration by going back to the 'Session' category, selecting yo
 >ur saved session, and pressing the 'save' button.
114 
115#. Double-click your saved session.
116 
117#. A black terminal window should appear.
118 
119#. You will be prompted for a username and password.  
120 
121#. You should be greeted by the server if successful.  Leave the putty window op
 >en.
122 
123#. `Configure Firefox... <#configure-firefox-to-use-the-ssh-tunnel>`_
124 
125 
126SSH Tunnel created from a Linux localhost
127------------------------------------------------
128 
129Follow this guide if your localhost (work or school) computer is Linux.
130 
131Create the tunnel
132~~~~~~~~~~~~~~~~~~~~~~
133 
134Open a terminal or console window, and enter the following command:
135 
136.. code-block:: bash
137 
138 ssh -ND 7070 user@remotehost_ip
139 
140You will be prompted for credentials on the remotehost.  
141 
142All you need to do is login to establish the tunnel.
143 
144 
145 
146Configure Firefox to use the SSH Tunnel
147------------------------------------------
148 
149Setup Socks 5 proxy.
150 
151#. Open Firefox_.
152 
153#. Click **Edit** -> **Preferences**
154 
155#. Click the **Advanced** and **Network** tabs.
156 
157#. Click the **Settings...** button.
158 
159#. Click the **Manual Proxy Configuration** radio button
160 
161#. In **Socks Host** type *localhost*.  In port type *7070*.
162 
163 .. image:: /attachment/ff-settings.jpg
164  :align: left 
165 
166You should now be able to browse the Internet using your remote connection.  All
 > data will be passed through the remote hosts internet connection.  All traffic 
 >will be encrypted between the localhost and the remotehost.
167 
168 
169Tunnel to multiple vnc hosts behind a firewall
170==============================================================
171 
172.. code-block:: bash
173 
174 ssh -L <localport>:<remotehost>:<remoteport> <ssh-user>@<remote>
175 
176 ssh -L 31337:remote.foxhop.net:5900 user@foxhop.net
177 
178 ssh -L 31338:remote2.foxhop.net:5900 user@foxhop.net
179 
180Then open vnc and point to 127.0.0.1:31338 or 127.0.0.1:31337
rev 14  |  unknown  |  1289323063000  |  JSON

rev 13
rev 14
t No Differences Found t No Differences Found 
rev 13  |  unknown  |  1289323060000  |  JSON

rev 12
rev 13
t12qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrthmvt1rymMyO  <a href="http://ccfdfrkqyubk.com/">ccfdfrkqyubk</a>, [url=http://cgtazrw
>tzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/link>htfgg.com/]cgtazrwhtfgg[/url], [link=http://cxrmntdtgsvz.com/]cxrmntdtgsvz[/link
>], http://fknxjhefhdak.com/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcld>], http://rwlmlnhtyvae.com/
>qe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeele 
>uko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.com/2qyQdJ  <a href="http://sz 
>qptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[/u 
>rl], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.com 
>/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrthm 
>vtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/lin 
>k], http://fknxjhefhdak.com/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcl 
>dqe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeel 
>euko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.com/2qyQdJ  <a href="http://s 
>zqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[/ 
>url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.co 
>m/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrth 
>mvtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/li 
>nk], http://fknxjhefhdak.com/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphc 
>ldqe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkee 
>leuko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.com/2qyQdJ  <a href="http:// 
>szqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[ 
>/url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.c 
>om/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrt 
>hmvtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/l 
>ink], http://fknxjhefhdak.com/ 
rev 12  |  unknown  |  1289303262000  |  JSON

rev 11
rev 12
t No Differences Found t No Differences Found 
rev 11  |  unknown  |  1289303250000  |  JSON

rev 10
rev 11
t1SSH Tunnel for HTTP Traffict12qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrthmv
 >tzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/link
 >], http://fknxjhefhdak.com/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcld
 >qe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeele
 >uko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.com/2qyQdJ  <a href="http://sz
 >qptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[/u
 >rl], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.com
 >/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrthm
 >vtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/lin
 >k], http://fknxjhefhdak.com/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcl
 >dqe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeel
 >euko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.com/2qyQdJ  <a href="http://s
 >zqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[/
 >url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.co
 >m/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrth
 >mvtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/li
 >nk], http://fknxjhefhdak.com/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphc
 >ldqe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkee
 >leuko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.com/2qyQdJ  <a href="http://
 >szqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrthmvtzjcm.com/]rwrthmvtzjcm[
 >/url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/link], http://fknxjhefhdak.c
 >om/2qyQdJ  <a href="http://szqptphcldqe.com/">szqptphcldqe</a>, [url=http://rwrt
 >hmvtzjcm.com/]rwrthmvtzjcm[/url], [link=http://pbvvkeeleuko.com/]pbvvkeeleuko[/l
 >ink], http://fknxjhefhdak.com/
2==============================
3 
4**Are You stuck behind a firewall?**
5 
6 Does your school, library, work, or parents control where you surf and what por
>ts you have open? Do you surf on such public domains and need more privacy? Are  
>you sick of failing proxies? If you answered 'Y' to any of these questions then  
>this tutorial is for you. 
7 
8**My Story** 
9 
10 My place of employment has a bastard firewall and it blocks nearly all ports an
>d many great sites. (such as foxhop.net, icodeviruses.com, or youtube.com).  I n 
>eeded a way to get around the blocks and not get caught. 
11 
12 
13 
14.. contents:: Sections 
15 
16Common Questions
17-------------------
18**What is the best way to get around a firewall?** 
19 
20 Create an SSH tunnel from the work network to your home network.
21 
22**My network administrator is smart, will I get caught?**
23 
24 No, you will most likely not get caught.  All the firewall sees is a connection
> to a resource on the internet.  When you browse the web using the tunnel all tr 
>affic is encrypted.  If a network administrator captured packets he would only g 
>et garbage data.  An SSH tunnel is basically a VPN between two computers or netw 
>orks.  1337      
25 
26**Can a network admin stop a person or computer from tunneling?**
27 
28 The Admin will typically not know about the tunnel.  From his view a tiny conne
>ction is being placed and is normally overlooked.  The admin does have the abili 
>ty to block the default SSH port 22.  You can build your tunnel over any port. 
29 
30Article Scope
31-------------------
32 
33.. _Putty.exe: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
34.. _Firefox: http://portableapps.com/apps/internet/firefox_portable
35 
36We will discuss the steps of building an SSH Tunnel for HTTP traffic between two
> computers on different networks.  This guide will cover both windows and linux  
>localhosts. 
37 
38Throughout this guide I will use the following terms, here are the definitions:
39 
40*localhost*
41 The computer at work or school.
42*remotehost*
43 The computer or server that is offsite, which has the SSH server running.
44 
45**What you need ...**
46 
47#. Credentials to a remotehost running an SSH server. (openssh-server)
48#. A localhost computer crippled by a pesky network firewall.
49#. An SSH client, For windows get Putty.exe_
50#. Firefox_ ( Portable is best )
51 
52**Why is this the best method?**
53 
54#. Most of the configuration is done from the localhost (while at school or work
>). 
55#. You don't need admin rights to run Putty.exe_, just place it on a USB drive.
56#. You don't need admin rights to run Firefox_ Portable, just place it on a USB 
>drive. 
57#. No changes need to be made on the remotehost ssh server.
58 
59 
60SSH Tunnel created from a Windows localhost
61-----------------------------------------------
62 
63Follow this guide if your localhost (school or work) computer is Windows based.
64 
65Configure the SSH Server
66~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67 
68The remotehost SSH server doesn't need to be configured.  
69 
70Just be sure its installed and running and that you have credentials to login. I
>t just needs to be installed and running and you just need credentials. 
71 
72To install openSSH-server on Debian or Ubuntu linux type:
73 
74.. code-block:: apache
75 
76 sudo apt-get install ssh
77  
78When I'm at work, I establish an SSH Tunnel to my remotehost webserver at home. 
>  
79 
80Keep in mind that this doesn't have to be your server, you just need credentials
> for SSH.  
81 
82 
83Configure the SSH Client
84~~~~~~~~~~~~~~~~~~~~~~~~~~~
85#. Download Putty.exe_ if you haven't already, you should follow along.
86 
87#. Double click Putty.exe_.
88 
89   .. image:: http://engineer.siue.edu/puttyConnectScreen.gif
90 
91#. The 'Host Name (or IP address)' box should point to the SSH enabled remoteser
>ver.  
92 
93#. Toggle the SSH radio button to set the port to 22. (The native SSH port). 
94 
95#. Type a name into the 'Saved Sessions' box to save all the settings we toggle.
96 
97#. Click the save button.
98 
99#. There is a list of categories to the left of the putty window.
100 
101#. Navigate to: ( Connection > SSH > Tunnel )
102 
103#. You should be at a menu that is labeled 'Options controlling SSH port forward
>ing'. 
104    
105#. Click the 'Dynamic' radio button. 
106 
107#. Leave 'Destination' text box blank.
108 
109#. Type '7070' into the 'Source port' text box.
110 
111#. Click the 'Add' button.
112 
113#. Save your configuration by going back to the 'Session' category, selecting yo
>ur saved session, and pressing the 'save' button. 
114 
115#. Double-click your saved session.
116 
117#. A black terminal window should appear.
118 
119#. You will be prompted for a username and password.  
120 
121#. You should be greeted by the server if successful.  Leave the putty window op
>en. 
122 
123#. `Configure Firefox... <#configure-firefox-to-use-the-ssh-tunnel>`_
124 
125 
126SSH Tunnel created from a Linux localhost
127------------------------------------------------
128 
129Follow this guide if your localhost (work or school) computer is Linux.
130 
131Create the tunnel
132~~~~~~~~~~~~~~~~~~~~~~
133 
134Open a terminal or console window, and enter the following command:
135 
136.. code-block:: bash
137 
138 ssh -ND 7070 user@remotehost_ip
139 
140You will be prompted for credentials on the remotehost.  
141 
142All you need to do is login to establish the tunnel.
143 
144 
145 
146Configure Firefox to use the SSH Tunnel
147------------------------------------------
148 
149Setup Socks 5 proxy.
150 
151#. Open Firefox_.
152 
153#. Click **Edit** -> **Preferences**
154 
155#. Click the **Advanced** and **Network** tabs.
156 
157#. Click the **Settings...** button.
158 
159#. Click the **Manual Proxy Configuration** radio button
160 
161#. In **Socks Host** type *localhost*.  In port type *7070*.
162 
163 .. image:: /attachment/ff-settings.jpg
164  :align: left 
165 
166You should now be able to browse the Internet using your remote connection.  All
> data will be passed through the remote hosts internet connection.  All traffic  
>will be encrypted between the localhost and the remotehost. 
167 
168 
169Tunnel to multiple vnc hosts behind a firewall
170==============================================================
171 
172.. code-block:: bash
173 
174 ssh -L <localport>:<remotehost>:<remoteport> <ssh-user>@<remote>
175 
176 ssh -L 31337:remote.foxhop.net:5900 user@foxhop.net
177 
178 ssh -L 31338:remote2.foxhop.net:5900 user@foxhop.net
179 
180Then open vnc and point to 127.0.0.1:31338 or 127.0.0.1:31337
rev 10  |  foxhop  |  1287238068000  |  JSON

rev 9
rev 10
170==============================================================170==============================================================
171171
n172ssh -L [localport]:remotehost:remoteport sshuser@sshservern172.. code-block:: bash
173173
n174ssh -L 31337:rhost1:5900 user@foxhop.netn174 ssh -L <localport>:<remotehost>:<remoteport> <ssh-user>@<remote>
175175
tt176 ssh -L 31337:remote.foxhop.net:5900 user@foxhop.net
177 
176ssh -L 31338:rhost2:5900 user@foxhop.net178 ssh -L 31338:remote2.foxhop.net:5900 user@foxhop.net
179 
180Then open vnc and point to 127.0.0.1:31338 or 127.0.0.1:31337
rev 9  |  foxhop  |  1287237724000  |  JSON

rev 8
rev 9
161#. In **Socks Host** type *localhost*.  In port type *7070*.161#. In **Socks Host** type *localhost*.  In port type *7070*.
162162
tt163 .. image:: /attachment/ff-settings.jpg
164  :align: left 
165 
163You should now be able to browse the Internet using your remote connection.  All166You should now be able to browse the Internet using your remote connection.  All
> data will be passed through the remote hosts internet connection.  All traffic > data will be passed through the remote hosts internet connection.  All traffic 
>will be encrypted between the localhost and the remotehost.>will be encrypted between the localhost and the remotehost.
164167
rev 8  |  foxhop  |  1287237275000  |  JSON

rev 7
rev 8
134Open a terminal or console window, and enter the following command:134Open a terminal or console window, and enter the following command:
135135
t136..code-block:: apachet136.. code-block:: bash
137137
138 ssh -ND 7070 user@remotehost_ip138 ssh -ND 7070 user@remotehost_ip
rev 7  |  foxhop  |  1287237240000  |  JSON

rev 6
rev 7
83Configure the SSH Client83Configure the SSH Client
84~~~~~~~~~~~~~~~~~~~~~~~~~~~84~~~~~~~~~~~~~~~~~~~~~~~~~~~
n85 #. Download Putty.exe_ if you haven't already, you should follow along.n85#. Download Putty.exe_ if you haven't already, you should follow along.
8686
n87 #. Double click Putty.exe_.n87#. Double click Putty.exe_.
8888
n89    .. image:: http://engineer.siue.edu/puttyConnectScreen.gifn89   .. image:: http://engineer.siue.edu/puttyConnectScreen.gif
9090
n91 #. The 'Host Name (or IP address)' box should point to the SSH enabled remotesen91#. The 'Host Name (or IP address)' box should point to the SSH enabled remoteser
>rver. >ver. 
9292
n93 #. Toggle the SSH radio button to set the port to 22. (The native SSH port). n93#. Toggle the SSH radio button to set the port to 22. (The native SSH port). 
9494
n95 #. Type a name into the 'Saved Sessions' box to save all the settings we togglen95#. Type a name into the 'Saved Sessions' box to save all the settings we toggle.
>. 
9696
n97 #. Click the save button.n97#. Click the save button.
9898
n99 #. There is a list of categories to the left of the putty window.n99#. There is a list of categories to the left of the putty window.
100100
n101 #. Navigate to: ( Connection > SSH > Tunnel )n101#. Navigate to: ( Connection > SSH > Tunnel )
102102
n103 #. You should be at a menu that is labeled 'Options controlling SSH port forwarn103#. You should be at a menu that is labeled 'Options controlling SSH port forward
>ding'.>ing'.
104    104    
n105 #. Click the 'Dynamic' radio button. n105#. Click the 'Dynamic' radio button. 
106106
n107 #. Leave 'Destination' text box blank.n107#. Leave 'Destination' text box blank.
108 108 
n109 #. Type '7070' into the 'Source port' text box.n109#. Type '7070' into the 'Source port' text box.
110110
n111 #. Click the 'Add' button.n111#. Click the 'Add' button.
112112
n113 #. Save your configuration by going back to the 'Session' category, selecting yn113#. Save your configuration by going back to the 'Session' category, selecting yo
>our saved session, and pressing the 'save' button.>ur saved session, and pressing the 'save' button.
114114
n115 #. Double-click your saved session.n115#. Double-click your saved session.
116116
n117 #. A black terminal window should appear.n117#. A black terminal window should appear.
118118
n119 #. You will be prompted for a username and password.  n119#. You will be prompted for a username and password.  
120120
n121 #. You should be greeted by the server if successful.  Leave the putty window on121#. You should be greeted by the server if successful.  Leave the putty window op
>pen.>en.
122122
n123 #. `Configure Firefox... <#configure-firefox-to-use-the-ssh-tunnel>`_n123#. `Configure Firefox... <#configure-firefox-to-use-the-ssh-tunnel>`_
124124
125125
127------------------------------------------------127------------------------------------------------
128128
n129 Follow this guide if your localhost (work or school) computer is Linux.n129Follow this guide if your localhost (work or school) computer is Linux.
130130
131Create the tunnel131Create the tunnel
132~~~~~~~~~~~~~~~~~~~~~~132~~~~~~~~~~~~~~~~~~~~~~
133133
t134Open a terminal or console window, and enter the following command::t134Open a terminal or console window, and enter the following command:
135 
136..code-block:: apache
135137
136 ssh -ND 7070 user@remotehost_ip138 ssh -ND 7070 user@remotehost_ip
rev 6  |  foxhop  |  1287237128000  |  JSON

rev 5
rev 6
4**Are You stuck behind a firewall?**4**Are You stuck behind a firewall?**
55
n6 Does your school, library, work, or parents control where you surf and what porn6 Does your school, library, work, or parents control where you surf and what por
>ts you have open? Do you surf on such public domains and need more privacy? Are >ts you have open? Do you surf on such public domains and need more privacy? Are 
>you sick of failing proxies?>you sick of failing proxies? If you answered 'Y' to any of these questions then 
 >this tutorial is for you.
7 
8 If you answered 'Y' to any of these questions then this tutorial is for you.
97
10**My Story** 8**My Story** 
63-----------------------------------------------61-----------------------------------------------
6462
n65 Follow this guide if your localhost (school or work) computer is Windows based.n63Follow this guide if your localhost (school or work) computer is Windows based.
6664
67Configure the SSH Server65Configure the SSH Server
72Just be sure its installed and running and that you have credentials to login. I70Just be sure its installed and running and that you have credentials to login. I
>t just needs to be installed and running and you just need credentials.>t just needs to be installed and running and you just need credentials.
7371
n74To install openSSH-server on Debian or Ubuntu linux type::n72To install openSSH-server on Debian or Ubuntu linux type:
7573
t76.. code-block:: pythont74.. code-block:: apache
7775
78 sudo apt-get install ssh76 sudo apt-get install ssh
rev 5  |  foxhop  |  1287237009000  |  JSON

rev 4
rev 5
1111
12 My place of employment has a bastard firewall and it blocks nearly all ports an12 My place of employment has a bastard firewall and it blocks nearly all ports an
>d many great sites. (such as foxhop.net, icodeviruses.com, or youtube.com).  I n>d many great sites. (such as foxhop.net, icodeviruses.com, or youtube.com).  I n
>eeded a way to get around the blocks and not get caught.>eeded a way to get around the blocks and not get caught.
tt13 
1314
1415
rev 4  |  foxhop  |  1287236885000  |  JSON

rev 3
rev 4
66Configure the SSH Server66Configure the SSH Server
67~~~~~~~~~~~~~~~~~~~~~~~~~~~~~67~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
n68 The remotehost SSH server doesn't need to be configured.  n
6968
n70 Just be sure its installed and running and that you have credentials to login. n69The remotehost SSH server doesn't need to be configured.  
>It just needs to be installed and running and you just need credentials. 
7170
n72 To install openSSH-server on Debian or Ubuntu linux type::n71Just be sure its installed and running and that you have credentials to login. I
 >t just needs to be installed and running and you just need credentials.
7372
nn73To install openSSH-server on Debian or Ubuntu linux type::
74 
75.. code-block:: python
76 
74  sudo apt-get install ssh77 sudo apt-get install ssh
75  78  
n76 When I'm at work, I establish an SSH Tunnel to my remotehost webserver at home.n79When I'm at work, I establish an SSH Tunnel to my remotehost webserver at home. 
>  > 
7780
t78 Keep in mind that this doesn't have to be your server, you just need credentialt81Keep in mind that this doesn't have to be your server, you just need credentials
>s for SSH. > for SSH. 
7982
8083
rev 3  |  foxhop  |  1279911218000  |  JSON

rev 2
rev 3
165ssh -L [localport]:remotehost:remoteport sshuser@sshserver165ssh -L [localport]:remotehost:remoteport sshuser@sshserver
166166
t167ssh -L 31337:ryu:5900 user@foxhop.nett167ssh -L 31337:rhost1:5900 user@foxhop.net
168 
169ssh -L 31338:rhost2:5900 user@foxhop.net
rev 2  |  foxhop  |  1279909354000  |  JSON

rev 1
rev 2
139139
140140
nn141 
141Configure Firefox to use the SSH Tunnel142Configure Firefox to use the SSH Tunnel
142------------------------------------------143------------------------------------------
157158
158You should now be able to browse the Internet using your remote connection.  All159You should now be able to browse the Internet using your remote connection.  All
> data will be passed through the remote hosts internet connection.  All traffic > data will be passed through the remote hosts internet connection.  All traffic 
>will be encrypted between the localhost and the remotehost.>will be encrypted between the localhost and the remotehost.
tt160 
161 
162Tunnel to multiple vnc hosts behind a firewall
163==============================================================
164 
165ssh -L [localport]:remotehost:remoteport sshuser@sshserver
166 
167ssh -L 31337:ryu:5900 user@foxhop.net
rev 1  |  foxhop  |  1276973224000  |  JSON

empty
rev 1
tt1SSH Tunnel for HTTP Traffic
2==============================
3 
4**Are You stuck behind a firewall?**
5 
6 Does your school, library, work, or parents control where you surf and what por
 >ts you have open? Do you surf on such public domains and need more privacy? Are 
 >you sick of failing proxies?
7 
8 If you answered 'Y' to any of these questions then this tutorial is for you.
9 
10**My Story** 
11 
12 My place of employment has a bastard firewall and it blocks nearly all ports an
 >d many great sites. (such as foxhop.net, icodeviruses.com, or youtube.com).  I n
 >eeded a way to get around the blocks and not get caught.
13 
14 
15.. contents:: Sections 
16 
17Common Questions
18-------------------
19**What is the best way to get around a firewall?** 
20 
21 Create an SSH tunnel from the work network to your home network.
22 
23**My network administrator is smart, will I get caught?**
24 
25 No, you will most likely not get caught.  All the firewall sees is a connection
 > to a resource on the internet.  When you browse the web using the tunnel all tr
 >affic is encrypted.  If a network administrator captured packets he would only g
 >et garbage data.  An SSH tunnel is basically a VPN between two computers or netw
 >orks.  1337     
26 
27**Can a network admin stop a person or computer from tunneling?**
28 
29 The Admin will typically not know about the tunnel.  From his view a tiny conne
 >ction is being placed and is normally overlooked.  The admin does have the abili
 >ty to block the default SSH port 22.  You can build your tunnel over any port.
30 
31Article Scope
32-------------------
33 
34.. _Putty.exe: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
35.. _Firefox: http://portableapps.com/apps/internet/firefox_portable
36 
37We will discuss the steps of building an SSH Tunnel for HTTP traffic between two
 > computers on different networks.  This guide will cover both windows and linux 
 >localhosts.
38 
39Throughout this guide I will use the following terms, here are the definitions:
40 
41*localhost*
42 The computer at work or school.
43*remotehost*
44 The computer or server that is offsite, which has the SSH server running.
45 
46**What you need ...**
47 
48#. Credentials to a remotehost running an SSH server. (openssh-server)
49#. A localhost computer crippled by a pesky network firewall.
50#. An SSH client, For windows get Putty.exe_
51#. Firefox_ ( Portable is best )
52 
53**Why is this the best method?**
54 
55#. Most of the configuration is done from the localhost (while at school or work
 >).
56#. You don't need admin rights to run Putty.exe_, just place it on a USB drive.
57#. You don't need admin rights to run Firefox_ Portable, just place it on a USB 
 >drive.
58#. No changes need to be made on the remotehost ssh server.
59 
60 
61SSH Tunnel created from a Windows localhost
62-----------------------------------------------
63 
64 Follow this guide if your localhost (school or work) computer is Windows based.
65 
66Configure the SSH Server
67~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 The remotehost SSH server doesn't need to be configured.  
69 
70 Just be sure its installed and running and that you have credentials to login. 
 >It just needs to be installed and running and you just need credentials.
71 
72 To install openSSH-server on Debian or Ubuntu linux type::
73 
74  sudo apt-get install ssh
75  
76 When I'm at work, I establish an SSH Tunnel to my remotehost webserver at home.
 >  
77 
78 Keep in mind that this doesn't have to be your server, you just need credential
 >s for SSH. 
79 
80 
81Configure the SSH Client
82~~~~~~~~~~~~~~~~~~~~~~~~~~~
83 #. Download Putty.exe_ if you haven't already, you should follow along.
84 
85 #. Double click Putty.exe_.
86 
87    .. image:: http://engineer.siue.edu/puttyConnectScreen.gif
88 
89 #. The 'Host Name (or IP address)' box should point to the SSH enabled remotese
 >rver. 
90 
91 #. Toggle the SSH radio button to set the port to 22. (The native SSH port). 
92 
93 #. Type a name into the 'Saved Sessions' box to save all the settings we toggle
 >.
94 
95 #. Click the save button.
96 
97 #. There is a list of categories to the left of the putty window.
98 
99 #. Navigate to: ( Connection > SSH > Tunnel )
100 
101 #. You should be at a menu that is labeled 'Options controlling SSH port forwar
 >ding'.
102    
103 #. Click the 'Dynamic' radio button. 
104 
105 #. Leave 'Destination' text box blank.
106 
107 #. Type '7070' into the 'Source port' text box.
108 
109 #. Click the 'Add' button.
110 
111 #. Save your configuration by going back to the 'Session' category, selecting y
 >our saved session, and pressing the 'save' button.
112 
113 #. Double-click your saved session.
114 
115 #. A black terminal window should appear.
116 
117 #. You will be prompted for a username and password.  
118 
119 #. You should be greeted by the server if successful.  Leave the putty window o
 >pen.
120 
121 #. `Configure Firefox... <#configure-firefox-to-use-the-ssh-tunnel>`_
122 
123 
124SSH Tunnel created from a Linux localhost
125------------------------------------------------
126 
127 Follow this guide if your localhost (work or school) computer is Linux.
128 
129Create the tunnel
130~~~~~~~~~~~~~~~~~~~~~~
131 
132Open a terminal or console window, and enter the following command::
133 
134 ssh -ND 7070 user@remotehost_ip
135 
136You will be prompted for credentials on the remotehost.  
137 
138All you need to do is login to establish the tunnel.
139 
140 
141Configure Firefox to use the SSH Tunnel
142------------------------------------------
143 
144Setup Socks 5 proxy.
145 
146#. Open Firefox_.
147 
148#. Click **Edit** -> **Preferences**
149 
150#. Click the **Advanced** and **Network** tabs.
151 
152#. Click the **Settings...** button.
153 
154#. Click the **Manual Proxy Configuration** radio button
155 
156#. In **Socks Host** type *localhost*.  In port type *7070*.
157 
158You should now be able to browse the Internet using your remote connection.  All
 > data will be passed through the remote hosts internet connection.  All traffic 
 >will be encrypted between the localhost and the remotehost.