local port to remote port
1 |
|
this means forwarding our local port 9000 to imgur.com:80
remote port to local port
1 |
|
this means forwarding example.com server port 9000 to local 3000 port
By default, OpenSSH only allows connecting to remote forwarded ports from the server host. However, the GatewayPorts option in the server configuration file sshd_config can be used to control this. The following alternatives are possible:
1 |
|
This allows anyone to connect to the forwarded ports. If the server is on the public Internet, anyone on the Internet can connect to the port.
1 |
|