Check your Google Cloud VPC network firewall for any egress rules that allow unrestricted access (i.e. 0.0.0.0/0) to any TCP/UDP ports and restrict access to only those IP addresses and/or IP ranges that require it in order to implement the principle of least privilege and reduce the attack surface.
Allowing unrestricted outbound/egress access on all TCP/UDP ports can increase opportunities for malicious activities such as Distributed Denial of Service (DDoS) attacks.
Audit
To determine if your Google Cloud VPC firewall rules allow unrestricted outbound access on all ports, perform the following actions:
Remediation / Resolution
To update your VPC network firewall rules configuration in order to restrict egress access to trusted entities only (i.e. authorized IP addresses or IP ranges), perform the following actions:
References
- Google Cloud Platform (GCP) Documentation
- VPC firewall rules overview
- Using firewall rules
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud compute networks list
- gcloud compute firewall-rules list
- gcloud beta compute firewall-rules update