Ensure that your Google Cloud Platform (GCP) projects are not using the default Virtual Private Cloud (VPC) network, in order to follow security best practices and meet networking requirements.
A default Virtual Private Cloud (VPC) is designed in such a way that you can quickly deploy GCP resources and not have to think about the underlying network. The default VPC comes with a predefined network configuration that automatically generates 4 over-permissive, insecure firewall rules, that are not included in the audit logging:
"default-allow-internal" – this rule allows ingress connections for all TCP, UDP and ICMP protocols and all ports (0-65535) among VM instances within the network.
"default-allow-ssh" – allows ingress connections on TCP port 22 (SSH) from any source to any virtual machine (VM) instance in the network.
"default-allow-rdp" – this firewall rule allows ingress connections on TCP port 3389 (RDP) from any source to any VM instance in the network.
"default-allow-icmp" – allows ingress ICMP traffic from any source to any VM instance within the network.
The default Virtual Private Cloud (VPC) network is also an auto-mode network, which means that its subnets use the same predefined range of IPv4 addresses, and as a result, it's not possible to use Cloud VPN or VPC Network Peering feature with the default network. A default VPC might be suitable for getting started quickly with your GCP project, however, when you deploy complex, production applications and use multi-tier architectures, you may need to keep parts of your network private or customize the network model, therefore it is recommended to create a non-default VPC that suits your specific project requirements.
Audit
To determine if the default Virtual Private Cloud (VPC) is being used within your GCP projects, perform the following actions:
Remediation / Resolution
To remove the default Virtual Private Cloud (VPC) network from your GCP project, create a new non-default VPC network and migrate your cloud applications to it, perform the following actions:
References
- Google Cloud Platform (GCP) Documentation
- VPC overview
- VPC network overview
- Using VPC networks
- Firewall Rules Logging overview
- Cloud Router documentation
- Apply Cloud DNS server policies
- CIS Security Documentation
- Securing Google Cloud Computing Platform