Extended Use of SSH Tunnelling with Putty to Access Inaccessible Remote Desktop and URL

Now, let us take another samples of using Putty for SSH tunneling, other than like explained in previous article.

Basically, the pre-conditions are similar with previous one. First, there is Server-A which it can be connected through SSH from user’s PC, and Server-A has connectivity to access remote desktop and web server of Server-B. Second, TCP forwarding is enabled in Server-A. (Kindly read previous article how to enable it, if required)

Note: To make sure Server-A has connectivity through remote desktop to Server B, TCP port 3389 has to be opened from Server-A to Server-B. And for accessing web server, TCP/HTTP port 80, used as sample, has to be opened from Server-A to Server-B.

URL

Dynamic port method will be used to access inaccessible URL: http://Server-B/.

First, establish SSH connection to Server-A using Putty. Once connected, open change settings menu (right click on top panel and choose change settings). There is category box on left side, go to Connection > SSH > then click Tunnels. Put any available local port on Source port text box (in this example, 4000 is chosen), tick Dynamic radio button, after that click Add then Apply.

Second, open browser (in this sample, Mozilla is used), go to Options > Advanced > Network > Connections Settings. Tick Manual Proxy Configuration, leave all with empty/default value, except on SOCKS Host, fill as localhost and Port: 4000. And also kindly do not forget to tick SOCKS v5, then click OK button.

Once done, now try to access http://Server-B/, it will be opened.

Remote Desktop

Method that will be used is putting IP and Port of Server-B explicitly in tunneling. Assuming IP of Server-B is 10.10.10.11.

First, Establish SSH connection to Server-A using Putty. Once connected, open change settings menu (right click on top panel and choose change settings). There is category box on left side, go to Connection > SSH > then click Tunnels. Put any available local port on Source port text box (in this example, 4002 is chosen). And on Destination, fill explicitly the IP and port of Server-B, with format IP:port, in this example, value is 10.10.10.11:3389), tick Local radio button, after that click Add then Apply.

Second, Open Remote Desktop Application, fill the Computer’s field with localhost:4002 then Connect, or simply Ctrl+R then type: mstsc /v: localhost:4002 then Enter. After that, Remote Desktop to Server-B will be possible.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s