Medium1 markMultiple Choice

GCP ACE · Question 30 · Domain 3.5: Deploying and implementing networking resources

You have a VPC network with several Compute Engine instances. You want to allow incoming HTTP (port 80) traffic ONLY to specific instances acting as web servers, while blocking it for database instances in the same subnet.

Which TWO steps should you take to implement this using GCP Firewall Rules? (Select TWO)

Answer options:

A.

Create a new subnet specifically for the web servers.

B.

Add a specific network tag (e.g., 'web-server') to the web server instances.

C.

Create an ingress firewall rule allowing port 80 and set the 'Target tags' to the tag used on the web servers.

D.

Configure the guest OS firewall (e.g., iptables) on the database instances to block port 80.

E.

Create an egress firewall rule blocking port 80 from the database instances.

How to approach this question

Understand how GCP firewall rules target specific instances.

Full Answer

GCP Firewall rules are stateful and applied at the virtual network level. To apply a rule to a subset of instances (even within the same subnet), you use Network Tags or Service Accounts. You tag the web servers (e.g., 'web-server') and then create an ingress rule that targets that specific tag.

Common mistakes

Thinking you must separate VMs into different subnets to apply different firewall rules.

Practice the full GCP Associate Cloud Engineer Practice Exam 4

50 questions · hints · full answers · grading

More questions from this exam