How to Create Firewall Rule on Google Cloud Platform.


Virtual Private Cloud (VPC) firewall rules apply to a given project and network. VPC firewall rules let you allow or deny connections to or from your virtual machine (VM) instances based on a configuration that you specify.

When you create a VPC firewall rule, you specify a VPC network and a set of components that define what the rule does. The components enable you to target certain types of traffic, based on the traffic’s protocol, destination ports, sources, and destinations.


  • Login to google cloud platform portal.
  • Click on VPC network.
  • Select Firewall.


Fig 1


  • Click on Create Firewall rule.


Fig 2


  • Provide the firewall rule name.
  • On Logs for monitoring the log.
  • Select Default or existing VPC network.
  • Set the priority of rule.
  • Select Ingress for Direction of traffic.


Fig. 3


  • Select Allow for Action on Match.
  • Select Targets, If you want to allow traffic to all clients in the network the select All instances in the network  & If you want to allow traffic to specific clients, select Specified target tags & provide the Targets tags.
  • Provide the Source IP address range.
  • Allow all protocols & ports or Provide some specific protocols & ports.


Fig. 4


  • Click on Create.


Fig. 6


  • After sometime firewall rule is ready then go to firewall home page.
  • Firewall rule is there with the name we provide.


Fig. 7


Create Firewall Rule using Shall


Fig. 8


Leave a Reply