title: DigitalOcean Ubuntu droplet not serving port 80
body: <p>I have a simple Python server on a DigitalOcean Ubuntu droplet that should serve the index.html file in the /dist folder:</p>
  
  <pre><code>port = 8000
  os.chdir(os.path.join(os.path.dirname(__file__), 'dist'))
  Handler = http.server.SimpleHTTPRequestHandler
  httpd = socketserver.TCPServer(('', port), Handler)
  print('Serving at port ', port)
  httpd.serve_forever()
  </code></pre>
  
  <p>I ran 'sudo ufw allow 80/tcp' to open the firewall and if I run ufw status it shows port 80 as being open to everybody. I ran 'sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8000' to redirect traffic from port 80 to port 8000.</p>
  
  <p>If I run nmap from another box, the only open port is ssh on 22. Port 80 is filtered. Navigating to the host in my browser results in a connection timeout. What could be causing this?</p>