Google Professional Cloud Network Engineer Question 364
Single answerGoogle Cloud PlatformYou are tasked with configuring a firewall rule in Google Cloud to allow HTTP traffic from external users to a specific web server hosted in a custom VPC. The firewall rule should prioritize this HTTP traffic over other existing rules and restrict access only to the TCP protocol on port 80. What configuration must you use to achieve this?
- A
Set the priority to a lower number than existing rules, specify ingress direction, and allow tcp:80.
- B
Set the priority to a higher number than existing rules, specify egress direction, and allow tcp:80.
- C
Set the priority to a lower number than existing rules, specify egress direction, and allow all protocols.
- D
Set the priority to a lower number than existing rules, specify ingress direction, and allow all protocols.
Show answer and explanation
Correct answer: A
Explanation
To allow HTTP traffic to a specific web server, you need to configure a firewall rule with a lower priority number than existing rules (as lower priority numbers take precedence), specify ingress direction for incoming traffic, and restrict the rule to tcp:80 to allow only HTTP traffic. Incorrect configurations such as using egress direction or allowing all protocols would not meet the requirements.
- A. Correct.
Correct. A lower priority number ensures this rule is evaluated before others. Specifying ingress allows traffic into the web server, and tcp:80 ensures only HTTP traffic is allowed.
- B. Incorrect.
Incorrect. A higher priority number would mean this rule is evaluated after existing rules, which is not desired. Additionally, egress direction is incorrect because the traffic is coming into the web server.
- C. Incorrect.
Incorrect. Although a lower priority number is correct, egress direction is incorrect for incoming traffic, and allowing all protocols does not restrict traffic to HTTP.
- D. Incorrect.
Incorrect. While the priority and ingress direction are correct, allowing all protocols does not restrict the rule to HTTP traffic over TCP port 80.