1 2 3 4

There is another computer on my network and I want to open one of its ports to the outside world so that others can access it.

 another computer               my computer                           gateway
@@@@@@@@@@@@@@@@@@          @@@@@@@@@@@@@@@@@@                  @@@@@@@@@@@@@@@@@@
@      (B)       @          @                @                  @       (D)      @
@                @          @                @       ssh        @                @
@ my app <----- 1234 <----- @                @ <==============> @ <------------ 8080 <--- curl gateway:8080
@                @ (A)      @                @     username     @                @ (C)
@                @          @   ssh client   @       (E)        @   ssh server   @
@@@@@@@@@@@@@@@@@@          @@@@@@@@@@@@@@@@@@                  @@@@@@@@@@@@@@@@@@
            

Example

My application runs on another computer in my network and I want people from outside of my network to access it.

Important

I'm sure that 'GatewayPorts' is set to 'yes' on the gateway.
If this is not the case, it can be set by executing this command on the gateway:

echo 'GatewayPorts yes' >> sshd_config