Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

VM Ports not working.

Hi, I have a GCP VM and I want to place an application on it but it needs to be able to have the ports accessed. But allowing ports specifically, or even allowing all doesn't work.

So I try opening a SSH terminal on a custom port (8080)

I tried adding the firewall in the terminal and manually.
I deleted and added it from the terminal. No way works.
I tried allowing from anywhere on all ports
I tried allowing the specific IP On the specific ports.
I tried making a new VM in a different location.

I set the firewall rules for all instances.

Clicking on the troubleshooting shows no errors.
I saw 2 APIs needed to be enabled at first, but the ports still don't work even after enabling them.

 

MAJTT_0-1705365820985.png

 

1 5 1,238
5 REPLIES 5

Hi @MAJ-TT,

Welcome to the Google Cloud Community!

How exactly did you configure the firewall rule/policy? Kindly provide screenshots.

Here are the steps that you may try to add a firewall rule. In the Google Cloud Console, go to VPC network > Firewall > Create Firewall Rule, and then:

  1. Enter a name for the new rule.
  2. Select 'All instances in the network' for the targets.
  3. Enter 0.0.0.0/0 in the 'Source IP ranges'.
  4. Check the 'tcp' box and enter 8080 for the specified ports.
  5. Click 'Create' to save the new firewall rule.

You can always contact Google Cloud Support to further look into your case. Thank you!

Hey, I already did this.
I allowed from 0.0.0.0/0 (anywhere) 
And I also allowed from every port

I did it even to specific ip.Screenshot 2024-01-20 232932.png
None work.

Update: 
Sometimes it doesn't even allow me to enter the ssh terminal. That uses the web port.. 

When this happened it staied not connecting for a bit but after a few hours it starting back working.

However the other ports still don't work. It only allows me to connect to the ssh terminal, if I try opening on custom port it wont allow me to enter.
Even though the troubleshooting shows no errors.

same problem. did you have solved it?

Having same issue here. I've created the firewall rule correctly for port 8080, but cannot access the service at that port.