hardgcloud

Update an existing VPC firewall rule to change allowed protocols or ports

command

gcloud compute firewall-rules update RULE_NAME --allow PROTOCOL:PORT

also accepted

gcloud compute firewall-rules update

Command breakdown

Part of the Google Cloud CLI (gcloud) — Networking category.

gcloudcomputefirewall-rulesupdateRULE_NAME--allowPROTOCOL:PORT
FlagPurpose
--allowBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →