GCP firewall rule open to 0.0.0.0/0
Google Cloud VPC firewall rules allow traffic by source range. A rule with source 0.0.0.0/0 on an admin or database port makes every instance it targets reachable from the whole internet.
Why it matters
GCP external IPs are scanned the same as everywhere else; open SSH (22), RDP (3389) and database ports are found and attacked quickly.
The default network ships with permissive rules, so a project that never tightened them may be exposed without anyone adding a rule.
How to check for it
- gcloud compute firewall-rules list --filter="sourceRanges:0.0.0.0/0" --format="table(name,allowed[].map().firewall_rule().list(),targetTags.list())".
- In the console, VPC network → Firewall: look for 'Ingress' rules with source 0.0.0.0/0 on ports other than 80/443.
How to fix it
- Restrict the rule's source ranges to known CIDRs, or use Identity-Aware Proxy (IAP) for SSH/RDP instead of a public port.
- gcloud compute firewall-rules update <rule> --source-ranges=<your-cidr>, and delete unused permissive rules.
SkyShield checks this automatically
Connect your AWS, Cloudflare, GitHub, GitLab, Hetzner or DigitalOcean account read-only and SkyShield flags this across every account and region, with the fix in plain words — alongside the agent that watches your servers. Start free.
FAQ
- What is Identity-Aware Proxy for SSH?
- IAP tunnels SSH/RDP through Google's identity layer, so you don't need any public ingress port — access is granted by IAM, not by IP.