'Internal traffic between two Google Cloud Compute instances not working

I want to enable internal traffic between two VM instances in the same VPC but block traffic from outside the VPC.

I've set up a new VPC network named vpc-dev.

In this network, I've created two VM instances with Ubuntu 20.04.

I've created a new rule for allowing internal traffic in this VPC with the instructions from google cloud docs: https://cloud.google.com/vpc/docs/firewalls.

But when I do - curl 10.0.3.9 -> I'm getting - curl: (7) Failed to connect to 10.0.3.9 port 80 after 0 ms: Connection refused

The configuration of the VPC for the selected region:

enter image description here

The VM instances: enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source