Description
To prevent use of default
network, a project should not have a default
network.
Rationaleβ
The default
network has a preconfigured network configuration and automatically generates the following insecure firewall rules:
β’ default-allow-internal: Allows ingress connections for all protocols and ports among instances in the network.
β’ default-allow-ssh: Allows ingress connections on TCP port 22(SSH) from any source to any instance in the network.
β’ default-allow-rdp: Allows ingress connections on TCP port 3389(RDP) from any source to any instance in the network.
β’ default-allow-icmp: Allows ingress ICMP traffic from any source to any instance in the network.
These automatically created firewall rules do not get audit logged by default.
Furthermore, the default network is an auto mode network, which means that its subnets use the same predefined range of IP addresses, and as a result, it's not possible to use Cloud VPN or VPC Network Peering with the default network.
Based on organization security and networking requirements, the organization should create a new network and delete the default
network.
Impactβ
When an organization deletes the default network, it will need to remove all asests from that network and migrate them to a new network.
Auditβ
From Google Cloud Consoleβ
- Go to the
VPC networks
page by visiting: https://console.cloud.google.com/networking/networks/list. - Ensure that a network with the name
default
is not present.
From Google Cloud CLIβ
-
Set the project name in the Google Cloud Shell:
gcloud config set project PROJECT_ID
-
List the networks configured in that project:
gcloud compute networks list
It should not list default
as one of the available networks in that project.
Preventionβ
The user can prevent the default network and its insecure default firewall rules from being created by setting up an Organization Policy to Skip default network creation
at https://console.cloud.google.com/iam-admin/orgpolicies/compute-skipDefaultNetworkCreation.
Default Valueβ
By default, for each project, a default
network is created.
Referencesβ
- https://cloud.google.com/compute/docs/networking#firewall_rules
- https://cloud.google.com/compute/docs/reference/latest/networks/insert
- https://cloud.google.com/compute/docs/reference/latest/networks/delete
- https://cloud.google.com/vpc/docs/firewall-rules-logging
- https://cloud.google.com/vpc/docs/vpc#default-network
- https://cloud.google.com/sdk/gcloud/reference/compute/networks/delete