For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/default_rules/def-000-45s.md. A documentation index is available at /llms.txt.

RDP access should be restricted from the internet

Description

This rule fails when an enabled ingress VPC firewall rule allows RDP traffic on port 3389 from 0.0.0.0/0 or ::/0. RDP open to the internet exposes instances to brute-force and exploit attempts against the Remote Desktop service. A firewall rule matches when it allows tcp, protocol 6, or all protocols, and its ports include 3389, include a range that covers 3389, or are omitted (which allows every port). Source ranges can be IPv4 or IPv6 CIDR blocks, and a rule with no source ranges, source tags, or source service accounts is treated as 0.0.0.0/0, the GCP default. A missing direction is treated as ingress. Malformed rules fail even when another entry or the source range is valid, including an allow entry with no protocol, a port that is not a number or ascending N-M range within 0 to 65535, or an empty source entry. Disabled firewall rules and egress rules are skipped.

Remediation

  1. Edit the flagged firewall rule to allow port 3389 only from known source ranges, or delete it, by following Use VPC firewall rules.
  2. For administrative access through IAP for TCP forwarding, allow ingress on port 3389 from 35.235.240.0/20 for IPv4 VMs or 2600:2d00:1:7::/64 for IPv6 VMs, using a separate firewall rule for each IP family when both are needed.

References