Stay organized with collections
Save and categorize content based on your preferences.
Identify firewall rules needed
Your workstations connect to the control plane through
Private Service Connect. The following subsections provide example
gcloud CLI commands to allow ingress and egress.
For more information about these commands, see the
gcloud compute firewall-rules
reference information.
Allow ingress
For the connection to succeed, create a firewall rule to allow ingress to the control plane
IP address from the workstation VMs. Cloud Workstations automatically applies
the cloud-workstations-instance network tag to the workstation VMs, which can
be used when creating firewall rules that apply to workstation VMs. See the
following example gcloud CLI command:
CLUSTER: the ID of the cluster or fully qualified
identifier for the cluster.
PROJECT: the project hosting the workstation cluster.
REGION: the region location of the workstation—for
example, us-central1.
Allow egress
You also need firewall rules that allow egress to the control plane IP address
from VMs with the cloud-workstations-instance tag for the TCP protocol on
ports 980 and 443 as shown in the following gcloud CLI command:
You can configure custom network tags for your workstation VMs in the
Google Cloud console. When you create or edit a workstation configuration, update
your machine configuration to include your network tags in the Network tags
field. For details on how to add Network tags, see the instructions for
specifying Advanced options when creating your machine
configuration.
Alternatively, when using the API, apply custom network tags through the
host.gceInstance.tags option on the workstation configuration resource.
For more information about Virtual Private Cloud (VPC) firewall rules in
Google Cloud, see
Create VPC firewall rules
in the VPC documentation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Configure firewall rules\n\nIdentify firewall rules needed\n------------------------------\n\nYour workstations connect to the control plane through\nPrivate Service Connect. The following subsections provide example\n`gcloud` CLI commands to allow ingress and egress.\nFor more information about these commands, see the\n[`gcloud compute firewall-rules`](/sdk/gcloud/reference/compute/firewall-rules/create)\nreference information.\n\n### Allow ingress\n\nFor the connection to succeed, create a firewall rule to allow ingress to the control plane\nIP address from the workstation VMs. Cloud Workstations automatically applies\nthe `cloud-workstations-instance` network tag to the workstation VMs, which can\nbe used when creating firewall rules that apply to workstation VMs. See the\nfollowing example `gcloud` CLI command: \n\n gcloud compute firewall-rules create \u003cvar translate=\"no\"\u003eRULE_NAME\u003c/var\u003e \\\n --action=ALLOW \\\n --direction=INGRESS \\\n --network=\u003cvar translate=\"no\"\u003eNETWORK\u003c/var\u003e \\\n --rules=tcp\\\n --source-tags=cloud-workstations-instance \\\n --destination-ranges=\u003cvar translate=\"no\"\u003eCONTROL_PLANE_IP\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eRULE_NAME\u003c/var\u003e: the name of the firewall rule to create\n- \u003cvar translate=\"no\"\u003eNETWORK\u003c/var\u003e: the network specified on the workstation cluster resource\n- \u003cvar translate=\"no\"\u003eCONTROL_PLANE_IP\u003c/var\u003e: the internal IP address of the control\n plane for the workstation cluster.\n\n To find this IP address, run the following command: \n\n gcloud workstations clusters describe \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eCLUSTER\u003c/span\u003e\u003c/var\u003e --project=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePROJECT\u003c/span\u003e\u003c/var\u003e --region=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eREGION\u003c/span\u003e\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eCLUSTER\u003c/var\u003e: the ID of the cluster or fully qualified identifier for the cluster.\n - \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e: the project hosting the workstation cluster.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region location of the workstation---for example, `us-central1`.\n\n### Allow egress\n\nYou also need firewall rules that allow egress to the control plane IP address\nfrom VMs with the `cloud-workstations-instance` tag for the TCP protocol on\nports `980` and `443` as shown in the following `gcloud` CLI command: \n\n gcloud compute firewall-rules create \u003cvar translate=\"no\"\u003eRULE_NAME\u003c/var\u003e \\\n --action=ALLOW \\\n --direction=EGRESS \\\n --network=\u003cvar translate=\"no\"\u003eNETWORK\u003c/var\u003e \\\n --rules=tcp:980,tcp:443 \\\n --target-tags=cloud-workstations-instance \\\n --destination-ranges=\u003cvar translate=\"no\"\u003eCONTROL_PLANE_IP\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eRULE_NAME\u003c/var\u003e: the name of the firewall rule to create\n- \u003cvar translate=\"no\"\u003eNETWORK\u003c/var\u003e: the network to which this rule is attached. If omitted, the rule attaches to the default network.\n- \u003cvar translate=\"no\"\u003eCONTROL_PLANE_IP\u003c/var\u003e: the internal IP address of the control\n plane for the workstation cluster.\n\n To find this IP address, run the following command: \n\n gcloud workstations clusters describe \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eCLUSTER\u003c/span\u003e\u003c/var\u003e --project=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePROJECT\u003c/span\u003e\u003c/var\u003e --region=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eREGION\u003c/span\u003e\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eCLUSTER\u003c/var\u003e: the ID of the cluster or fully qualified identifier for the cluster.\n - \u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e: the project hosting the workstation cluster.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region location of the workstation---for example, `us-central1`.\n\nFor more information, see also the following topics:\n\n- [WorkstationCluster](/workstations/docs/reference/rest/v1/projects.locations.workstationClusters)\n REST API\n\n- [Allow internal ingress connections between VMs](/vpc/docs/using-firewalls#common-use-cases-allow-internal)\n\nAdd firewall rules using custom network tags\n--------------------------------------------\n\nYou can configure custom network tags for your workstation VMs in the\nGoogle Cloud console. When you create or edit a workstation configuration, update\nyour machine configuration to include your network tags in the **Network tags**\nfield. For details on how to add **Network tags** , see the instructions for\nspecifying **Advanced options** when [creating your machine\nconfiguration](/workstations/docs/create-configuration#create_a_machine_configuration).\nAlternatively, when using the API, apply custom network tags through the\n`host.gceInstance.tags` option on the workstation configuration resource.\n\nFor more information about Virtual Private Cloud (VPC) firewall rules in\nGoogle Cloud, see\n[Create VPC firewall rules](/vpc/docs/using-firewalls#creating_firewall_rules)\nin the VPC documentation."]]