Windows – How to solve google chrome “Failed to load resource: net::ERR_CONNECTION_REFUSED” issue in windows 10 when server is running on Ubuntu 18.04

flaskgoogle-chromeubuntu-18.04vpnwindows

I am trying to run this project on Ubuntu 18.04 server. I am running both server and client on this machine. Then from windows 10 with port 9000 I am getting access to client in my chrome browser at http://localhost:8000/#/

The browser loads the project but the problem is I can't log into the website with trusted account and some other data do not get loaded . When I see browser console I see an error message saying:

Failed to load resource: net::ERR_CONNECTION_REFUSED

This is the server setting:
enter image description here

This is the client setting and putty setting to connect to client.
enter image description here

VPN has been used to connect to server via PuTTY.

The error message in browser:
enter image description here

Could anyone shed some light on this issue? Is it related to windows 10 or VPN or some other issues? I followed some steps from here https://www.ionos.com/digitalguide/hosting/technical-matters/err-connection-reset/

Best Answer

By default, the Flask development environment uses 127.0.0.1 (localhost), which restricts access to process on the same host (except for VMs/containers, which aren't a factor here).

To access Flask from outside of localhost (e.g., from your Windows 10 machine), use the IP address 0.0.0.0. (You can pass it to run(), or via a command line option of the flask command.

However, do note the warnings about (not) using the development environment for production use.