To get this working, all you need is an SSH server connected to a public IP address. In my setup, I have a desktop computer running Ubuntu 9.10 and OpenSSH and port 22 is forwarded from my Linksys router to this computer. It's also a good idea to create a shell-less account specifically for ssh tunnels.
sudo useradd sshtunnelOnce that's done, edit the passwd file entry for this user by changing the end of the line to say
sudo passwd sshtunnel
/bin/falseThis will allow the user "sshtunnel" to connect via SSH, but it won't be able to execute commands.
To get things set up, you'll need to initiate an SSH connection from the remote LAN to your server. I've come to prefer MyEnTunnel for Windows clients as it will run as a service and will automatically re-initiate a connection if it drops. To set up MyEnTunnel, run the "Edit Service Profile INI" from the Start Menu. On the "Settings" tab, fill in the specifics of your server and connection - I have "Connect on Startup", "Reconnect on Failure", "Infinite Retry Attempts = 300" configured on mine. Then on the "Tunnels" tab, make the following entry in the "Remote:" text box:
12345:localhost:3389Once you connect MyEnTunnel, it will open port 12345 on your server and connect it to port 3389 (the RDP port) on the localhost (the machine you're setting MyEnTunnel) up on. Alternatively, if you want to be able to connect to a different PC on the network instead of the one that you're configuring MyEnTunnel on, simply swap "localhost" for the LAN IP of that computer. For example:
12345:192.168.1.10:3389Save your settings and register the service (from the Start Menu entry for MyEnTunnel).
To make it work, from your server, open a Terminal Services Client and for the address use:
localhost:12345Hit "connect" and you should see a login window for the device you specified in the previous step.
Enjoy!


0 comments:
Post a Comment