title: How do I make a Flask app available for my friends through port-forwarding?
body: <p>So I created a simple Flask app to automate certain calculations we often have to do in math class. I'm now trying to let my friends use it too but I can't get the local port forwarding right. When I run the app I can access it from my local network but not from outside of it. (I tested that by trying to reach the web app through my phone on mobile data, and it doesn't respond.) I'm aware that ssh tunnelling is probably a better way to do this, but I still want to figure out what I'm doing wrong here.</p>
  
  <p>I am very new to this and used this video as a reference: <a href="https://www.youtube.com/watch?v=jfSLxs40sIw" rel="nofollow noreferrer">https://www.youtube.com/watch?v=jfSLxs40sIw</a>. Here's a brief summary of the things I already tried:</p>
  
  <p>I changed <code>app.run()</code> to <code>app.run(host='0.0.0.0',port=5000)</code> to make Flask respond to all public ip's. 
  When I now run my app I can access it from my computer via:</p>
  
  <p><a href="http://0.0.0.0:5000/" rel="nofollow noreferrer">http://0.0.0.0:5000/</a></p>
  
  <p><a href="http://127.0.0.1:5000/" rel="nofollow noreferrer">http://127.0.0.1:5000/</a></p>
  
  <p><a href="http://192.168.1.101:5000/" rel="nofollow noreferrer">http://192.168.1.101:5000/</a></p>
  
  <p>I then used freedns.afraid.org to create a subdomain flaskdries.mooo.com. When redirecting the subdomain to the latest ip-adress in the list (192.168.1.101:5000) it would always refuse to connect, even on the pc that's running the app. Using 127.0.0.1:5000 eventually did the trick for all the devices on my network <a href="https://i.stack.imgur.com/6ZKLM.png" rel="nofollow noreferrer">(image)</a>, but still not for devices outside of my network.
  I guess that's an obvious thing since my WAN ip is nowhere to be specified in this method. So if I'm correct, when someone goes to the subdomain, there is no link to my router so also not to the device running the app. The problem is that I have no clue where I should specify my WAN ip or something similar.</p>
  
  <p>I noticed that when I created the subdomain the destination was automatically set to my WAN ip
  <a href="https://i.stack.imgur.com/J01qO.png" rel="nofollow noreferrer">(image)</a>. At first I thought simply adding :5000 would work, but unfortunately it doesn't.</p>
  
  <p>As you might have noticed I am extremely new to this and don't really have any other information i can rely on apart from the internet, so any help is welcome!</p>
  
  <p>Thanks in advance,</p>
  
  <p>Dries</p>