How do I forward port 22 (ssh) to a station under NAT?

I need forward port 22 to a client's server.
I do not have access to the server!

How do I forward port 22 (ssh) to a station under NAT?

Unfortunatly, port 22 (SSH) is a port that you cannot forward when using the radio in NAT mode. You'll either need to setup the radio as a bridge OR router mode.

You could however use a different external port number, like 222,Ā and then forward to internal port 22. Whomever was wanting to connect to this ssh server from the outside world would just need to remember to useĀ 222 instead of 22.

3 Likes

I needed to do this today, and I found that it actually is possible through the CLI (at least if you're using the separateĀ  management IP feature - I wouldn't recommend it otherwise, since that would probably break SSH access to the SM), so I thought I'd add that here in case anyone else needs it.

The easiest way is to just add a port forward through the web interface with a different external port (like 222, for example), and then edit it through the CLI with the commands below:

set portForwardingTable (table entry number) portForwardingTableEntryWLANPortBegin 22
set portForwardingTable (table entry number)  portForwardingTableEntryWLANPortEnd 22
config save
config apply

Replace "(table entry number)" with the correct entry number for the port forward you are editing, in my case, it was 3 (if there's only one port forward setup, itĀ should always be 1).

1 Like