Remediation
From Google Cloud Console
- Go to
VPC Network. - Go to the
Firewall Rules. - Click the
Firewall Ruleto be modified. - Click
Edit. - Modify
Source IP rangesto specificIP. - Click
Save.
From Google Cloud CLI
-
Identify Firewall Rules Allowing Public Access
gcloud compute networks get-effective-firewalls default \
--format="table(NAME, DIRECTION, IP_RANGES)" \
--filter="IP_RANGES:0.0.0.0/0 AND DIRECTION:INGRESS" -
Restrict the Source Range
Once you have identified the firewall rules, update each one to restrict access to trusted CIDR ranges:
gcloud compute firewall-rules update {{firewall-rule-name}} \
--source-ranges={{cidr-range1}},{{cidr-range2}}