# Create a firewall rule on GCP

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/)
- [Technology stack overview](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/background/)
- [Create an Arm-based virtual machine using Microsoft Cobalt 100](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/azure-instance/)
- [Create a firewall rule on Azure](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/azure_firewall/)
- [Install Jenkins on Azure Ubuntu Arm64 virtual machine](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/azure-installation/)
- [Create a firewall rule on GCP](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/gcp_firewall/)
- [Create a Google Axion C4A virtual machine](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/gcp-instance/)
- [Install Jenkins on GCP SUSE Arm64 virtual machine](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/gcp-installation/)
- [Validate Jenkins installation](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/baseline/)
- [Build an Arm-native Go CI pipeline on Jenkins (GCP SUSE Arm64)](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/use_case1_gcp/)
- [Build a Docker-based CI pipeline on Arm64](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/use_case2-gcp/)
- [Next Steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/_next-steps/)

## Configure GCP firewall for Jenkins
To allow inbound TCP traffic on port 8080, create a firewall rule in the Google Cloud Console.

> **Note**  
> For more information about GCP setup, see [Getting started with Google Cloud Platform](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/google/).

## Create a firewall rule in GCP
To expose the TCP port 8080, create a firewall rule.

Navigate to the [Google Cloud Console](https://console.cloud.google.com/), go to **VPC Network > Firewall**, and select **Create firewall rule**.

![Create a firewall rule](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/images/firewall-rule1.png)  
Create a firewall rule

Next, create the firewall rule that exposes the TCP port 8080.  
Set the **Name** of the new rule to “allow-tcp-8080”. Select your network that you intend to bind to your VM (default is “autoscaling-net”, but your organization might have others).

Set **Direction of traffic** to “Ingress”. Set **Allow on match** to “Allow” and **Targets** to “Specified target tags”.

![Creating the TCP/8080 firewall rule](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/images/network-rule2.png)  
Creating the TCP/8080 firewall rule

Next, enter “allow-tcp-8080” in the **Target tags** text field. Set **Source IPv4 ranges** to “0.0.0.0/0”.

![Creating the TCP/8080 firewall rule](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/images/network-rule3.png)  
Creating the TCP/8080 firewall rule

Finally, select **Specified protocols and ports** under the **Protocols and ports** section. Select the **TCP** checkbox, enter “8080” in the **Ports** text field, and select **Create**.

![Specifying the TCP port to expose](https://learn.arm.com/learning-paths/servers-and-cloud-computing/jenkins/images/network-port.png)  
Specifying the TCP port to expose

The network firewall rule is now created, and you can continue with the VM creation.
