remote port forwarding
Apr 12, 2013
There are plenty of use-cases where you want your local machine to be available from the internet, without setting up port forwarding on your router. One easy way to enable this is remote port forwarding.
To tunnel requests to yourdomain.com:8080 to your localhost:3000, you would set it up like this (assuming Ubuntu):
- On server, put
GatewaysPorts yes
in the/etc/ssh/sshd_config
- On the server, run
service ssh restart
- On your local machine, run
ssh -R 8080:localhost:3000 user@server