> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-lightsail-instance-does-not-restrict-traffic-on-admin-ports.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS Lightsail Instance does not restrict traffic on admin ports

### Synopsis

| Field               | Value                                                           |
| ------------------- | --------------------------------------------------------------- |
| Rule Type           | Detection                                                       |
| Finding Type        | AWS Lightsail Instance does not restrict traffic on admin ports |
| Finding ID          | 60001483                                                        |
| Generates a Finding | This detection rule also generates a finding                    |
| Severity            | Medium                                                          |
| Category            | CONFIGURATION                                                   |
| Cloud Providers     | AWS                                                             |
| Platform Module     | CSPM                                                            |
| Asset Types         | AMAZON\_LIGHTSAIL\_INSTANCE                                     |
| ATT\&CK Tactic      | TA0112 (TA0112)                                                 |
| ATT\&CK Technique   | T1685 (T1685)                                                   |

### Description

AWS Lightsail instances with unrestricted access on ports 22 or 3389 are vulnerable to unauthorized access. These ports are commonly used for remote administration, making them prime targets for attackers.

The Lightsail firewall controls inbound traffic to instances via their public IP addresses. A misconfiguration allowing unrestricted access ("0.0.0.0/0" or "::/0") to ports 22 (SSH) or 3389 (RDP) exposes the instance to brute-force attacks and unauthorized login attempts from any IP address. Successful compromise grants attackers complete control.

Such misconfigurations leave the instance and potentially associated resources vulnerable to data breaches, malware infections, and further lateral movement within the environment. Restricting access to only trusted IP addresses minimizes the attack surface and strengthens security.

Mitigate this risk by configuring Lightsail's firewall rules to only allow inbound connections on ports 22 and 3389 from explicitly defined, trusted IP addresses. Regularly review and update these rules, removing any untrusted IP addresses that might have been added accidentally.

### Remediation

**Manual steps:**

Amazon Lightsail Instance - Manual remediation steps:

To restrict the traffic on the AWS Lighsail instance firewall rule to known IP/CIDR range, perform the following actions:

1. Sign in to the Lightsail console <https://lightsail.aws.amazon.com/>.
2. In the left navigation pane, choose Instances.
3. Choose the reported instance.
4. Choose the Networking tab on your instance's management page.
5. Click on the Edit icon on the rule contains the unrestricted access ("0.0.0.0/0" or "::/0") on port 22 or 3389 under the 'IPv4 Firewall' section or 'IPv6 firewall'

6a. Click on 'Restrict to IP address' to update Source IP address to the Trusted CIDR range

or

6b. Remove the rule which has 'Source' value as 0.0.0.0/0 or ::/0 and 'Port Range' value as 22 or 3389 or (range containing 3389 or 22) by clicking delete icon.

Note: Before making any changes, please check the impact on your applications/services.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-lightsail-instance-does-not-restrict-traffic-on-admin-ports.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
