the hello world example of the flask is run on my laptop on port 5000 and host 0.0.0.0.
I create a reverse ssh tunnel with :
ssh -R 5000:localhost:5000 usr@my-vps-ip
the curl localhost:5000 on my VPS will return the expected result.
I expect that curl my-vps-ip:5000 must also return the expected result too, but I get
Failed to connect to my-vps-ip 5000: Connection refused. stoping the firewall isn't solved the problem.
I tested this with ngrok, and that is working.
I'm doing something wrong?
Asked
Active
Viewed 23 times
0
Kamil Maciorowski
- 69,815
- 22
- 136
- 202
kankan256
- 113
- 5
-
@KamilMaciorowski yes. there are the same questions. But it did not solve my problem. – kankan256 Jan 27 '22 at 05:50
-
So please [edit] your question and state you tried `-R :5000:localhost:5000` and checked the state of `GatewayPorts` option on the SSH server. – Kamil Maciorowski Jan 27 '22 at 06:08
-
@KamilMaciorowski I the things you asked. – kankan256 Jan 27 '22 at 08:39
-
After changing to `clientspecified`, did you restart the SSH server or otherwise tell it to reload the configuration? – Kamil Maciorowski Jan 27 '22 at 08:39
-
@KamilMaciorowski i do that now, and problem is solved. tankyou man. – kankan256 Jan 27 '22 at 08:45
-
I restored your original question. I will improve my answer to the other question, so it states one needs to reload the configuration. – Kamil Maciorowski Jan 27 '22 at 08:47