Project

General

Profile

SSH Tunneling » History » Version 1

sph, 08/23/2010 05:49 PM

1 1 sph
h1. SSH Tunneling
2 1 sph
3 1 sph
This is more of a quick howto for those who are already somewhat familiar with SSH tunneling. For more detailed information about SSH tunneling you can check your SSH client's manpage.
4 1 sph
5 1 sph
There are two ways to tunnel your client-core connection over SSH. You can either use static port forwarding or use a socks5 proxy. 
6 1 sph
7 1 sph
h2. Static port forwarding
8 1 sph
9 1 sph
Forward local port 4242 to the correct on the core machine:
10 1 sph
11 1 sph
> <pre>$ ssh -L 4242:localhost:4242 example.com</pre>
12 1 sph
13 1 sph
The same can be achieved via PuTTY by entering _4242_ as source port and _localhost:4242_ as destination in the SSH > Tunnels tab.
14 1 sph
15 1 sph
In the client simply connect to localhost, port 4242.
16 1 sph
17 1 sph
h2. Socks 5 proxy
18 1 sph
19 1 sph
Modern SSH clients like OpenSSH and PuTTY can also use dynamic port forwarding by turning into a socks proxy. Quassel can then set up a connection to the core using this proxy.
20 1 sph
21 1 sph
> <pre>$ ssh -D 1080 example.com</pre>
22 1 sph
23 1 sph
In PuTTY, you can select the _Dynamic_ option and then add _1080_ in the SSH > Tunnels tab.
24 1 sph
25 1 sph
Now the client setup is a little bit more difficult since Qt 4.5 and earlier do not support hostname forwarding. You need to figure out the local IP address of the core as _127.0.0.1_ or _localhost_ will not work unfortunately.
26 1 sph
27 1 sph
Here is an example configuration: