Hello friends, Welcome on my blog
This article will cover scenario of port forwarding, what is port forwarding and How to ssh port forwarding. I will describe about ssh port forwarding you can do for other services as well.
Scenario Of SSH port Forwarding
I have running SSH server at my office and the LAN IP address is 192.168.0.3 and the Wan IP address is XXX.83.2.35. I have another laptop at my home, it has putty ssh client installed on window 10. I tried to access my Office ssh server from home by using servers’s LAN/WAN IP address, but failed. because the problem is there LAN IP address is only accessible from LAN network. but later I found ssh port forwarding can solve this problem. After ssh port forwarding in my office router I was able to access ssh server by using my home laptop. So in this article I am going to describe each and everything related ssh port forwarding.
What is port forwarding?
Port forwarding is a process that redirects a communication request from one IP address and port number to another IP address and port number through router or firewall.
After the port forwarding the request for SSH server on WAN IP address at office will be redirect on local IP address of ssh server at office. It means now I will be able to access office ssh server from home laptop. Not Only SSH service, you can port forwarding for any service such as HTTP/HTTPS, FTP, Telnet etc.
How to setup ssh port forwarding
In this section I am going to tell you about how to setup ssh port forwarding. for the port forwarding you must have the access of router where you want to redirect request to another local computer, So you can setup the ssh port forwarding. Mostly different router has a different methods to configure for a port forwarding, but all the processes are same. I am using TP-LINK router so I will describe each and everything on the router.
You should follow the giving instruction for ssh port forwarding:
- First I am going to check the status of running ssh server at local machine. I am going to access local ssh server by using putty ssh client. In the following image you can see “ssh server is running on local computer.
But at the same time when I am trying to access ssh server through WAN IP. I get the error. See in following image
- Access Router: Access the router by browsing the router IP address through web browser. Enter the correct username and password for accessing router’s configuration page.
- Click on Forwarding > Virtual Server and fill the required fields, and save.
- After click on save you can see you have added on entry of virtual server.
You can see here is two options one for modify entry and another for delete. if you want to modify port forwarding click on modify. if you dont want port forwarding any more click on delete and delete the entry.
- SSH port forwarding Check / Test: Now again try to access ssh server through WAN ip address from your home laptop. and you will get success this time.