Reputation: 11
I want to make a local port that serve a python http.server accessible to the internet without messing around with port-forwarding on my home router, tunnelling it on a digital ocean vps. My local port is 8080, the port on the remote vps 4444, just for example
ssh -i .ssh/mykey -R 4444:localhost:8080 root@myvpsip
But still http://myvpsip:4444 is not accessible
ufw is disabled on the vps..What am I missing?
Upvotes: 1
Views: 1015
Reputation: 640
For the forwarded port to listen on any address (and not just localhost
) you need to prepend an additional :
to the forward specification.
ssh -i .ssh/mykey -R :4444:localhost:8080 root@myvpsip
Additionally, you must have GatewayPorts yes
or GatewayPorts clientspecified
on the server-side sshd configuration.
Upvotes: 2