How to Open a Specific Port such as 9090 in Google Compute Engine

To open a specific port, such as 9090, in Google Compute Engine, you must create a firewall rule allowing traffic on that port.

Here’s a step-by-step guide on how to create a firewall rule in the Google Cloud Console.

  1. Go to the Google Cloud Console:

  2. Sign in with your Google account, and then select the appropriate project.

  3. In the left-side menu, click on the hamburger icon (three horizontal lines) and navigate to “VPC network” > “Firewall”.

  4. Click on the “Create Firewall Rule” button at the top of the page.
  5. Fill in the following details for your new firewall rule:
    • Name: Give your firewall rule a unique and descriptive name.
    • Description: (Optional) Add a description for the firewall rule.
    • Network: Choose the VPC network where your Google Compute Engine instances run.
    • Priority: Set the priority for the rule. Lower numbers indicate higher priority.
    • The direction of traffic: Select “Ingress” to allow incoming traffic.
    • Action on the match: Select “Allow” to permit traffic matching the rule.
    • Targets: Choose “All instances in the network” or “Specified target tags” based on your requirements. If you choose “Specified target tags,” specify the target tags you assigned to the instances you want to apply the rule.
    • Source Filter: Select “IP ranges” and provide the source IP ranges you want to allow traffic. You can use “” to allow traffic from any source, but this is not recommended for security reasons.
    • Protocols and ports: Choose “Specified protocols and ports” and enter the protocol and port number you want to open. For example, to open TCP port 9090, enter “tcp:9090” (without quotes).
  6. Click “Create” to save your new firewall rule. The rule will be applied to the specified instances, and the specified port will be opened.

Please note that opening ports to the internet can expose your instances to potential security risks. Always follow best practices for securing your instances, such as VPNs, SSH keys, and strong authentication methods.

I hope this will help you!

Leave a Comment