ssh port forwarding in router

How to ssh port forwarding in router – full guide

Tips and Tricks

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

ssh port forwarding in router

I have running SSH server at my office and the LAN IP address is 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:

  1.  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. ssh server 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
    Check ssh server by WAN IP

  2. 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.

    Access router by IP Address

  3. Click on Forwarding > Virtual Server and fill the required fields, and save.

    ssh port forwarding configuration

  4. After click on save you can see you have added on entry of virtual server.

    entry of ssh port forwarding
    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.

  5. 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.

    check ssh server on local computer


Vijay Kumar

Ethical Hacking & Penetration Testing Trainer, For more detail view My Profile

7 thoughts on “How to ssh port forwarding in router – full guide

Leave a Reply

Your email address will not be published. Required fields are marked *