Today I have to connect to computer (192.xxx.xxx.xxx) which is out of my LAN to test my client application which is have to send data  through port 12345. There’s no public IP or VPN in that computer LAN and one of best way I know about how to connect and have access with that computer is through tunneling, see picture below for illustration. By the way I’m currently running Windows OS and like title said we gonna use putty, anyway by landed in this post I expect you already knew what putty is so I wouldn’t explain about it & where you should download it.

PC labeled MDSaputra is PC I currently use, inside of it there’s client application that must connect to Server. PC with ip 182.xxx.xxx.xxx is the only connectible  PC from outside their LAN but the only way to connect to it only through port 22. Okay now lets make a way from that door.

  1. First run your PuTTy, expand SSH then click Tunnels,
  2. Fill source port with your available port (which port you want to use later), fill destination with server or target ip and port, then click Add,
  3. Click Session, fill Host Name with ip address of PC that connectible trough SSH, give a name for it, then Save.
  4. Double Click your saved session, you will be have to write user name and password, now the client application can send data to server (192.xxx.xxx.xxx) through localhost port 12345.
  5. We actually done , but if you want to get full access to 192.xxx.xxx.xxx you can try this command : username@192.xxx.xxx.xxx -p 2222
  6. Write the correct password, now 192.xxx.xxx.xxx is like your own PC, you can explore, delete, etc whatever you want.

Subscribe & fast response :