How to create a GCP firewall rule

Jump to navigation Jump to search

Creating a firewall rule

  • Login to the Firewall rules page:
  • Click on "Create Firewall Rule"
  • Name: Specify here a name for the new firewall rule (in lowercase)
  • Network: Select the relevant Google Virtual Private Cloud (VPC) Network
  • Priority: Specify the Priority of the rule
Note: The lower the number, the higher the priority
  • Direction of traffic: Choose either ingress (inbound traffic) or egress (outbound traffic)
  • Action on match: Choose either allow or deny
  • Targets: Select "All instances in the network" (destination of the specific firewall rule)
For more information, see:
  • Source filter: Select "IP ranges"
  • Source IP ranges: Specify the organization public IP subnet range or specify public IP CIDR
For more information, see:
  • Protocols and ports: Specify the relevant destination port (for example: tcp:22)
For more information, see:
  • Click on "Create"
  • Logoff the Google Cloud Platform management console