The default network should be removed from Google Cloud projects
This check looks at whether a project still contains the auto-created network named default. The safe setting is that the default network does not exist and traffic runs on networks you designed on purpose.
Why it matters
Unless an organization policy prevents it, each new project starts with a default network. Google documents it as an auto mode VPC network with one subnet in each region, and it comes with pre-populated IPv4 firewall rules. These include a rule allowing instance-to-instance traffic inside the network and ingress rules for RDP and SSH.
That is convenient for a first test but is broader than most production projects need, and every project gets the same layout. Replacing it with a network you planned keeps address ranges and firewall rules deliberate. See VPC networks in the Google Cloud documentation.
How to check it yourself
In the Google Cloud console open VPC network, then VPC networks, and select the project. A network named default in the list means the check fails.
With gcloud, which only lists:
gcloud compute networks list --project=<project id> --filter="name=default" --format="table(name, autoCreateSubnetworks)"No output means the network is absent. To see the firewall rules attached to it:
gcloud compute firewall-rules list --project=<project id> --filter="network:default"How to fix it
ConfigCobra uses a read-only service account and never changes your projects. First confirm nothing still uses the network: in the console check VM instances and other resources attached to it, and move them to another network. Then, in VPC networks, open default and select Delete VPC network. Delete or review its firewall rules first if the console asks for it.
With gcloud, delete the rules first, then the network:
gcloud compute firewall-rules list --project=<project id> --filter="network:default" --format="value(name)"
gcloud compute firewall-rules delete <rule name> --project=<project id>
gcloud compute networks delete default --project=<project id>To stop new projects getting one, Google documents the organization policy constraint compute.skipDefaultNetworkCreation.
What changes when you fix it
Any virtual machine, cluster or service attached to the default network loses connectivity once the network is deleted, and the SSH and RDP access the default rules gave is gone. Teams relying on that access need a new network with rules they agreed on, and a plan to move workloads first.
An empty, unused default network can be deleted without effect on running workloads. With the organization policy in place, new projects will have no network until someone creates one, which is intended.
Included in
| Benchmark | CIS ID | Profile |
|---|---|---|
| CIS Google Cloud Platform Foundation v5.0.0 | 3.1 | Level 2 |
Go further
- Networking12 controls in this section
- CIS Google Cloud Platform Foundation v5.0.093 controls
- CIS Google Cloud Platform Foundation checklistEvery control in one list, as CSV
- RemediationSee what a fix changes in your tenant before you apply it, then use the generated script
- Monitoring & DriftScheduled scans, drift detection and email alerts when a control regresses
Check this on your Google Cloud
ConfigCobra runs this check with every other control of the CIS Google Cloud Platform Foundation Benchmark, read-only.