JohnnyCyp
Posts: 75
Joined: Sun Mar 31, 2019 11:05 pm

How i make a public ip for the Raspberry Pi Flask webserver ?

Wed Jun 19, 2019 9:18 pm

Hello, can i have access from another network (not same network of RPi ) to the flask webserver in my raspberry pi ?

Code: Select all

import flask, flask.views
from flask import jsonify, request, Response
from werkzeug.contrib.fixers import ProxyFix 

app = flask.Flask(__name__)
.
.
.
app.wsgi_app = ProxyFix(app.wsgi_app)
try:
    if __name__ == '__main__':
        app.debug = True
        app.run(host='0.0.0.0', port=5000)
except KeyboardInterrupt:
    interact().clean()
    print "Webserver ended safe!"
I have tried to change the debug from to True to False but didn't works...

User avatar
B.Goode
Posts: 8482
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: How i make a public ip for the Raspberry Pi Flask webserver ?

Wed Jun 19, 2019 9:23 pm

You can't fix this in the RPi or its software.

'Port Forwarding' is the topic to Google for. It requires some reconfiguration of the network infrastructure that your RPi connects to.

JohnnyCyp
Posts: 75
Joined: Sun Mar 31, 2019 11:05 pm

Re: How i make a public ip for the Raspberry Pi Flask webserver ?

Wed Jun 19, 2019 9:36 pm

B.Goode wrote:
Wed Jun 19, 2019 9:23 pm
You can't fix this in the RPi or its software.

'Port Forwarding' is the topic to Google for. It requires some reconfiguration of the network infrastructure that your RPi connects to.
What if i make Raspberry Pi as an access point in the network ?

User avatar
B.Goode
Posts: 8482
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: How i make a public ip for the Raspberry Pi Flask webserver ?

Wed Jun 19, 2019 9:38 pm

JohnnyCyp wrote:
Wed Jun 19, 2019 9:36 pm
B.Goode wrote:
Wed Jun 19, 2019 9:23 pm
You can't fix this in the RPi or its software.

'Port Forwarding' is the topic to Google for. It requires some reconfiguration of the network infrastructure that your RPi connects to.
What if i make Raspberry Pi as an access point in the network ?

Then you will not be solving the problem posed in your initial post.

But if it meets your needs, do it.

Return to “Networking and servers”