I noticed I have the read only port 10255 opened to the wide web. We want to make it available only from inside the VPC, like this answer is suggesting. I'm not sure how to specify such rule. I've tried something like that:
gcloud compute firewall-rules create "testcloseport" --action=DENY --rules tcp:10255 --source-tags=public --source-ranges=0.0.0.0/0 --description="Close port 10255 from outside the vpc"
I unfortunately got this error:
ERROR: (gcloud.compute.firewall-rules.create) Could not fetch resource:
- The resource 'projects/myproject-prod/global/networks/default' was not found
I tried to set the region and zone like this:
gcloud config set compute/region us-east1
gcloud config set compute/zone us-east1-d
I still got the error. I simply want to close this port for the outside of the VPC. Is there a way I can change the firewall-rules create
command so it works?