Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
software:ssh [2010/03/08 23:12] cyril created |
software:ssh [2014/08/04 09:36] (current) cyril [Complete Forwarding] |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Static Forwarding ===== | ===== Static Forwarding ===== | ||
| + | Local forwarding: | ||
| < | < | ||
| ssh -L8021:< | ssh -L8021:< | ||
| + | </ | ||
| + | Remote forwarding (you need to set " | ||
| + | < | ||
| + | ssh -R8021:< | ||
| </ | </ | ||
| ===== Dynamic Forwarding ===== | ===== Dynamic Forwarding ===== | ||
| - | Use another machine as a proxy. | + | Use another machine as a proxy, turning localhost into a SOCKS proxy, eg on port 8080: |
| < | < | ||
| - | ssh -D8080 < | + | ssh [-fN] -D8080 < |
| </ | </ | ||
| - | | + | It may be a good idea to open a ssh server on a web port (80/ |
| - | * VLC : < | + | |
| + | Then configure your apps to use it: | ||
| + | * **Firefox** : Preferences | Advanced | Settings | Manual Proxy Configuration | SOCKS Host : localhost, Port : 8080 | ||
| + | | ||
| + | * **Thunderbird** : Preferences | Advanced | Network & Disk space | Settings | Manual Proxy Configuration | SOCKS Host : localhost, Port : 8080 | ||
| + | * **VLC** : '' | ||
| + | * **Pidgin** : Tools | Preferences | Proxy | Proxy type: SOCKS 4, Host: localhost, Port: 8080 | ||
| + | * **ssh**, **git**, **sshfs**, **scp**, **rsync** : / | ||
| + | # just to prevent from trying to use the proxy when you want to establish the proxy: | ||
| + | Host < | ||
| + | ProxyCommand socat STDIO TCP:%h:%p | ||
| + | # for using the proxy for everything else: | ||
| + | Host * | ||
| + | ProxyCommand socat STDIO SOCKS4: | ||
| + | </ | ||
| + | * **KDE apps** (Konqueror, but does not work with Kopete...) ~/ | ||
| + | [Proxy Settings] | ||
| + | ProxyType=1 | ||
| + | socksProxy=socks:// | ||
| + | </ | ||
| + | * **Applications that do not support use of a proxy**: configure tsocks in / | ||
| + | server = localhost | ||
| + | server_type = 5 | ||
| + | server_port = 8080 | ||
| + | </ | ||
| + | tsocks < | ||
| + | </ | ||
| + | You can do something similar and maybe more powerful with proxychains. | ||
| + | |||
| + | RSYNC protocol proxy:< | ||
| + | export RSYNC_CONNECT_PROG=' | ||
| + | </ | ||
| + | |||
| + | ===== Complete Forwarding ===== | ||
| + | |||
| + | Forward all the traffic so you don't have to configure every application. | ||
| + | * **VPN**: complicated to set up | ||
| + | * **SShuttle**:< | ||
| + | sshuttle --dns -r < | ||
| + | </ | ||
