The question in short
How do you run a simple Flask-based website visible to the internet, from a host PC which is accessing the internet from a wireless router?
Question details
I would like to make a flask application visible to the internet, as per Quickstart Guide.
If I launch the simple Flask app below, it becomes accessible from a computer on the same network as the host pc, but not from a device connected through the internet through another network.
The problem is similar to the one discussed here and here, with the added element that running from a home pc seems to suggest that external connections point to the xx port of the router, not to the xx port of the host pc, as is suggested in the comments in this post.
What I did
Referencing the code below, here's what I did:
- Checked my IP address in Control Panel
- disabled all network protection in the antivirus
- run `ipconfig /all', being on a windows machine
- finally opened a browser in a device connected to another network and pointed it to the appropriate IP:port address
The result is that "The webpage is not available".
Has anybody encountered the same problem? Is this a router issue?
Reference Flask app
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
if __name__ == '__main__':
app.run(host= '0.0.0.0', port=9000, debug=False)