PROFESSIONAL-CLOUD-NETWORK-ENGINEER · Question #45
You have installed Apache Tomcat 8.X on a compute engine in google cloud on port 8085 and you have also installed Jenkins on the same machine on a custom port. You have created a firewall rule that…
The correct answer is B. Create a firewall rule; select the correct network, create a target tag and attach the tag to the. GCP firewall rules apply at the network level and use target tags to scope which VM instances the rule applies to. The correct approach (B) is to create a firewall rule on the correct network that allows traffic on the Jenkins custom port, define a target tag, and attach that…
Question
Options
- ACreate a firewall rule; select the correct network and select the target as all instances in the
- BCreate a firewall rule; select the correct network, create a target tag and attach the tag to the
- CCreate a firewall rule; select the correct subnet which has the compute engine and allow all
- DCreate a firewall rule; select the correct subnet, create a target tag attach it to the compute engine
How the community answered
(31 responses)- A6% (2)
- B74% (23)
- C13% (4)
- D6% (2)
Explanation
GCP firewall rules apply at the network level and use target tags to scope which VM instances the rule applies to. The correct approach (B) is to create a firewall rule on the correct network that allows traffic on the Jenkins custom port, define a target tag, and attach that tag to the specific compute engine instance running Jenkins. This is the Google-recommended practice: it scopes the rule precisely to the intended VM without exposing the port on every instance. Option A (target all instances) is overly broad and a security risk. Option C allows all traffic on the subnet - far too permissive. Option D is incorrect because GCP firewall rules are not scoped to subnets; they are scoped to networks, with tags used for instance-level targeting.
Topics
Community Discussion
No community discussion yet for this question.