Can't connect to port 80 on Google Cloud Compute instance despite firewall rule

Ensure that VM level firewall is not intervening. For example, Container-Optimized OS is a bit special in comparison to all other default images:

By default, the Container-Optimized OS host firewall allows only outgoing connections, and accepts incoming connections only through the SSH service. To accept incoming connections on a Container-Optimized OS instance, you must open the ports your services are listening on.

https://cloud.google.com/container-optimized-os/docs/how-to/firewall


Checking the two check boxes "Allow HTTP traffic" and "Allow HTTPS traffic" did the trick. This created two Firewall rules, that opened the ports 80 and 443. Manually adding rules for those port didn't work for some reason, but it worked with checking the boxes.

VM instance details