GCP Firewall Rule Uses Port Ranges
A range opens ports nobody reviewed, so a service started later on one of them is exposed without a decision ever being made.
Free to start. No card. The playground just needs your work email.
Google Cloud
Found, explained, handed over.
Where the estate departs from your policies, frameworks and tagging rules.
Detect
ZopNight checks this automatically across Google Cloud, with read-only access to the account.
Explain
Every finding says exactly what to change: Replace port ranges on firewall rule.
Fix
The finding opens with the fix already written out, step by step, so it is one ticket, not an investigation.
- Applies to
- VPC Firewall Rules on Google Cloud
- The fix, by hand
- Inventory which workloads use the resource and which ports they actually need (firewall rule logging for 24 to 72h).
- Plan replacement rules scoped by source range + port. Office/VPN ingress: --source-ranges=‹office-cidr› --allow=tcp:22 (or use IAP Tunneling instead). Internal mesh: --source-ranges=‹vpc-cidr› --allow=tcp:443.
- Create the narrow rules: gcloud compute firewall-rules create ‹name› --network=‹vpc› --source-ranges=‹cidr› --allow=tcp:‹port›.
- For admin/SSH, prefer Identity-Aware Proxy: enable IAP, then allow source-ranges=35.235.240.0/20 only. No public 22.
- Delete the original wide-range rule once the replacement is verified.
- Tag-based firewall rules + secure tags scope rules to specific workloads instead of all VMs.
These are the steps the finding carries in the product.
- Category
- Compliance. Configuration drift from best practice: public access, missing MFA, unencrypted storage, deprecated runtimes.
- Where it appears
- The Compliance tab of Recommendations, with every affected resource listed.
- Rule ID
RC-1253- Full reference
Related checks
See the compliance findings in your account.
Connect a read-only role and the first pass runs on your own estate. This check, and the rest of the catalogue, with it.
Prefer to talk it through first? Book 20 minutes with the team.
- $30M+annualised cloud spend under management
- 550K+resources tracked since launch
- 20-60%off the bill in the first month
- SOC 2Type II report, plus ISO 27001
Figures published on zop.dev.