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 specific IP ranges. - 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}}