HTTP Server behind remote ssh tunnel on windows = πŸ’₯

Author

Simone Massaro

Published

January 16, 2025

I want to run a local web server on my windows machine and this needs to accesible by the remote computer.

I need this because the local server needs to open a local app on the windows machine when a certain endpoint is hit.

So I have a simple flask application that runs locally, however for the scope of today TIL that is not even relevant. What matters is that I need to access to local windows server from a remote computer.

Assuming the server is running on localhost:5000 and I want to access it from the remote server.

This is the idea:

This setup works on linux but can’t make it work on Windows.

If I login on the remote server and run curl http://localhost:5000 I get the response from the local server: curl: (52) Empty reply from server

I am quite sure this is a windows issue because I have remove all other possible sources of errors, but I can’t figure out what is the root cause.