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

Remote administration port access should be restricted to trusted networks

Description

AWS network ACLs should allow ingress to remote server administration ports, such as SSH (port 22) and RDP (port 3389), only from trusted networks. A network ACL fails when an inbound ALLOW rule with source 0.0.0.0/0 and protocol TCP (6), UDP (17), or ALL (-1) has a port range that includes port 22 or 3389, unless an explicit DENY rule for that port from 0.0.0.0/0 has a lower rule number and therefore takes precedence. TCP and UDP are evaluated separately: the DENY rule must use the same protocol as the ALLOW rule or use ALL (-1), so an ALL (-1) ALLOW rule is blocked only when both TCP and UDP for the port are denied first. A network ACL whose entries were not collected fails, while one with an explicitly empty entry list passes. An entry without an egress flag, or with a null one, is treated as inbound. Network ACLs are evaluated regardless of subnet association, and environment-specific administration ports beyond 22 and 3389 are not evaluated.

Remediation

In the AWS VPC console, select Network ACLs, choose the network ACL, open the Inbound Rules tab, and click Edit inbound rules. Change the rule’s source to a range other than 0.0.0.0/0, delete the offending rule, or add an explicit DENY rule for ports 22 and 3389 from 0.0.0.0/0 with a lower rule number than any broader ALLOW rule, then click Save. See Control subnet traffic with network access control lists for details.

References