> 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/gcp-vm-instance-with-the-external-ip-address.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP VM instance with the external IP address

### Synopsis

| Field               | Value                                        |
| ------------------- | -------------------------------------------- |
| Rule Type           | Detection                                    |
| Finding Type        | GCP VM instance with the external IP address |
| Finding ID          | 60000432                                     |
| Generates a Finding | This detection rule also generates a finding |
| Severity            | Medium                                       |
| Category            | CONFIGURATION                                |
| Cloud Providers     | GCP                                          |
| Platform Module     | CSPM                                         |
| Asset Types         | GOOGLE\_COMPUTE\_ENGINE\_VM\_INSTANCE        |

### Description

GCP Virtual Machine instances with public IP addresses present a significant security risk. Publicly accessible Virtual Machines increase the attack surface, exposing them to various threats.

The policy monitors for GCP Virtual Machines assigned public IP addresses. Using a public IP without proper security measures, such as firewalls and intrusion detection systems, allows direct internet access to the Virtual Machine. This exposes it to unauthorized access, brute-force attacks, and malware infections. A compromised Virtual Machine can lead to data breaches and service disruptions.

The impact of this misconfiguration can range from unauthorized access and data exfiltration to complete system compromise. Employing private IP addressing and secure access methods like VPNs or load balancers significantly reduces the risk of external attacks. This best practice minimizes the attack surface and strengthens the overall security posture.

To mitigate this risk, ensure Virtual Machines only use private IP addresses unless explicitly required. Restrict access using VPNs or load balancers for controlled and secure connections to public-facing services.

### Remediation

1. Login to the GCP console
2. Navigate to 'Compute Engine' and then 'VM instances'
3. Click on the reported VM instance
4. Stop the VM by clicking on the 'STOP' button. Click the 'STOP' button on the confirmation dialogue
5. Once the the VM has been stopped, click on the 'EDIT' button
6. Under 'Network interfaces', expand the network interface with the public external IP assigned
7. Select 'IPv4 (single-stack)' under IP stack type
8. Select 'None' under 'External IPv4 address'
9. Click on 'Save'
10. Click on 'START/RESUME' from the top menu


---

# 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/gcp-vm-instance-with-the-external-ip-address.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.
