Is your app actually listening on the external IP? When you run:
python app.py 135.235.175.28:8080
Make sure your Python app’s server code is binding to that IP address.
Most frameworks bind to 127.0.0.1 (localhost) by default, which means external access won’t work.
What to do:
Bind to all interfaces by using 0.0.0.0, like: python app.py 0.0.0.0:8080
or in your app code, ensure the server binds to 0.0.0.0 instead of a specific IP.
Verify the app is running and listening on the VM, run:
netstat -tuln | grep 8080
You should see something like:
tcp 0 0 0.0.0.0:8080 0.0.0.0: LISTEN*
If it says 127.0.0.1:8080, then it’s only listening on localhost.
Firewall & NSG: You said inbound port 8080 is open — double-check both:
VM’s OS firewall (e.g., ufw, firewalld)
Azure NSG (Network Security Group) inbound rules for the VM’s subnet or NIC
Make sure both allow inbound TCP traffic on port 8080.
Try curling from the VM itself run on VM:
curl http://135.235.175.28:8080
If localhost works but the external IP doesn’t, binding is the issue.
If neither works, the app may not be running or is failing.
Check the app logs
Maybe the app is crashing or throwing errors during startup.
If you found information is helpful, please click "Upvote" on the post to let us know.
If you have any further queries feel free to ask us we are happy to assist you.
Thank You.