Ensure that Virtual Private Cloud (VPC) firewall rules do not allow unrestricted access (i.e. 0.0.0.0/0) on TCP ports 20 and 21 in order to protect against attackers that use brute force methods to gain access to the virtual machine (VM) instances associated with the firewall rules. TCP ports 20 and 21 are used for data transfer and communication by the File Transfer Protocol (FTP) client-server applications.
Allowing unrestricted FTP access to your Google Cloud virtual machine (VM) instances via VPC network firewall rules can increase opportunities for malicious activities such as brute-force attacks, FTP bounce attacks, spoofing, and packet capture attacks.
Audit
To determine if your Google Cloud VPC firewall rules allow unrestricted access on TCP ports 20 and 21, perform the following operations:
Remediation / Resolution
To update your VPC network firewall rules configuration in order to restrict File Transfer Protocol (FTP) access to trusted, authorized IP addresses or IP ranges only, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- VPC network overview
- Using VPC networks
- 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 compute firewall-rules update