Create firewall rules for the VPC to allow the VPC access to instances.
-
Go to the Firewall rules page in the Google
Cloud Platform Console.
-
Set Ingress firewall rule for your VPC.
-
Click Create firewall rule.
-
Enter a Name for the firewall rule.
The name must be unique for the project.
-
Select the Network as your VPC network.
-
Specify the Priority of the rule.
The lower the number, the higher the priority.
-
Set the Direction of traffic to
Ingress.
-
Set the Action on match to
Allow.
-
Set the Targets to
All instances in the
network.
-
Set Source filter to
IP ranges
and type 0.0.0.0/0 in the Source IP ranges field
to define the source for incoming traffic from any network.
-
Set Protocols and ports to
Allow
all.
-
Click Create.
-
Set Egress firewall rule for your VPC.
-
Click Create firewall rule.
-
Enter a Name for the firewall rule.
The name must be unique for the project.
-
Select the Network as your VPC network.
-
Specify the Priority of the rule.
The lower the number, the higher the priority.
-
Set the Direction of traffic to
Egress.
-
Set the Action on match to
Allow.
-
Set the Targets to
All instances in the
network.
-
Set Destination filter to
IP
ranges and type 0.0.0.0/0 in the
Destination IP ranges field to define the destination for
outgoing traffic to anywhere.
-
Set Protocols and ports to
Allow
all.
-
Click Create.