life ideas

October 10, 2007

Tunneling trafiic over SSH with OpenWRT, DynDNS and Putty

Filed under: Uncategorized — manoftoday @ 12:57 am


1)  Tunneling HTTP over SSH

To connect to the SSH server and tunnel HTTP you will need the Putty SSH client.

To connect to your router enter the hostname or IP address of your router on the Session tab:

Next, to setup the tunnel.  click on Tunnels, enter 3000 (or whatever local port you’d like to use) for the source port, click Dynamic and click Add. This will create a SOCKS proxy on your local machine on port 3000 (or whatever port your chose) that you can use with your web browser.

Now you can click Open to log into your router. The tunnel isn’t created until you log in. Remember that your username is root and your password is your router password (you changed it right?).

Now you’re ready to connect your web browser. Using Firefox, you will have to configure a proxy server. Click Tools->Options->advanced. Then under Network tab, click on Settings… button . On the popup window screen, you can configure the SOCKS proxy that you’ve set up using Putty. Select Manual proxy configuration, enter localhost for the SOCKS host and 3000 for the port (or whatever you used). Click OK. You should now be tunneling through your home router over ssh.  after the setting, you have to close ALL OPENED firefox windows and restart Firefox to make it effect.


You can verify that the connections are being forwarded by looking at the Putty Event Log. You should see something similar to the following after loading in your web browser.

or verify by closing the putty session, then you won’t be able to view any webpage.


Source: Random Bits: HOWTO: Tunneling HTTP over SSH with DD-WRT, DynDNS and Putty

2)  Tunneling VNC over SSH


3)  Tunneling RemoteDesktop over SSH

Configure PuTTY for auto-login (if you choose to use PuTTY):

suppose sshd is on port 22 in your wireless router which has OpenWrt.

open putty

- type in your dyndns ip address of your router
- choose port 22
- connection -> SSH -> Tunnels
- source Port:  <--- NOTE here, mstsc can't connect to, so we have to use
- Destination -> ip_address_of_your_home_PC_Server_behind_OpenWrt:3389   (if remote desktop is used)
- press add
- open the connection to your router
- if you don't have free internet access, you can use also a proxy server to connect.
- if proxy is needed: connection -> proxy
- proxy type: http
then run windows terminal service client: mstsc , and connect to

in the following example, home windows server is running at with both windows terminal service running at port 3389(default) and VNC services at 5900(default)


4)  Configure PuTTY for auto-login

Configure PuTTY for auto-login (if you choose to use PuTTY):

  1. Make a shortcut to putty.exe on your Desktop
  2. Right click the shortcut, Properties > Shortcut tab > Target field
  3. Add the following to the end of the string in the field: -load “[your profile name]” -l [login name] -pw [password]
  4. Example: -load “home” -l Mark -pw mypassword

Blog at