Ensure that dangling DNS records are removed from your public Cloud DNS zones in order to maintain the integrity and authenticity of your domains/subdomains and to protect against domain hijacking.
When an ephemeral Google Cloud resource like an external IP address is released, it becomes available for others to use. An attacker could potentially acquire this IP and intercept traffic intended for your domain/subdomain hosted in Cloud DNS, or launch Denial-of-Service (DoS) attacks. Since you have no control over who gets the released IP, it is highly recommended to regularly check for any unused DNS records pointing to these IPs and remove them from your Cloud DNS zones.
Audit
To identify anhy dangling DNS records within your public Cloud DNS zones, perform the following operations:
Remediation / Resolution
To ensure that all dangling DNS records are removed from your public Cloud DNS zones, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- DNS zones overview
- Create, modify, and delete zones
- Quickstart: Set up DNS records for a domain name with Cloud DNS
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud dns managed-zones list
- gcloud dns record-sets list
- gcloud dns record-sets delete
- gcloud compute addresses list