Firewall rule permits unrestricted RDP access

Limit RDP administration to required administrators and controlled network paths.

Description

If a rule allows TCP 3389 from all IPv4 addresses, any client with a route to a target VM can attempt a Remote Desktop sign-in.

Potential impact

A compromised RDP password or a vulnerable service can expose the VM and internal resources.

Remediation

Remove RDP access from VMs that do not need it. For the rest, permit the approved VPN or IAP management path, require strong authentication and keep the service patched. Test that an approved administrator can connect and other sources are blocked.

Examples

Standard support for Deployment Manager has ended. Use supported tooling to select the actual VPC and target VMs when updating this legacy rule.

Before

yaml
resources:
  - name: firewall
    type: compute.v1.firewall
    properties:
      name: my-firewall
      sourceRanges:
        - 0.0.0.0/0
      allowed:
        - IPProtocol: tcp
          ports:
            - "3389"

After

yaml
resources:
  - name: firewall
    type: compute.v1.firewall
    properties:
      name: my-firewall
      sourceRanges:
        - 10.10.10.0/24
      allowed:
        - IPProtocol: tcp
          ports:
            - "3389"

Both excerpts allow TCP 3389. The source changes from 0.0.0.0/0 to 10.10.10.0/24. Replace this private range with the range your administrators actually connect from.

References