The flask attachment must be visible on the local network
I have a Flask application running under a VMware workstation.
- VMware uses NAT and the virtual machine has an IP of 192.168.52.132
- I am using app.run (host = '0.0.0.0') to run my application
- I can see that it works in the browser if I type http: // localhost: 5000
- I can also see that it works from my host machine if I type http://192.168.52.132:5000 or http: // localhost: 5000
-
netstat -tupln | grep ': 5000' gives me:
tcp || 0 || 0 0.0.0.0:5000 || 0.0.0.0:* || LISTEN || 44937 / python
-
As suggested in similar threads here, I did:
iptables -I INPUT -p tcp -dport 5000 -j ACCEPT
Unfortunately, if I try to open http://192.168.52.132:5000 from a different machine inside the same WiFi network, I get the message "Cannot connect to destination (192.168.52.132).
What else should I do to make the app display on other devices? Thank.
ps Running the app with debug = True didn't help me either.
+3
source to share
No one has answered this question yet
Check out similar questions: