Network Tags and Firewall Rules in GCP

This post will describe how to use network tags to Allow custom port for a specific VM instance on GCP. Also read - Firewall Rules and Policies in GCP.

How do I allow a custom port traffic into a VM?

This is the general recipe - 1. Create a firewall rule --> 2. Select the subnet --> 3. Create a target tag --> 4. Attach tag to Compute engine instance

Step 1 - Create a new FW rule with ALLOW on the protocol and TCP port you want to let in.

Step 2 - Select a Subnet

Step 3 - Create an  all0w-traffic Network Tag.

Step 4 - Attach the network tag to the VM

GCP VM network tag

Summary

Network tags are a reusable and easy way to work with firewall rules in GCP. This post describes a quick recipe for using network tags to create a firewall rule to let in specific port traffic.

anuj

I am passionate about getting cloud solutions right the first time. I help customers transition to the public cloud with the appropriate security controls and guardrails. GCP, AWS and Azure Security Specialist. <a href="https://calendly.com/anujvarma/google-cloud-architect-initial-consultation">Initial Consultation</a>

Leave a reply

Your email address will not be published. Required fields are marked *