> 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/cortex-xdr/insights-and-tips-cortex-xdr/security-operations-and-response/host-firewall-overview.md).

# Host firewall overview

Configure and manage the Cortex XDR host firewall through the Cortex XDR agent, including rules and location-based policies.

The Cortex XDR agent includes a host firewall. You manage endpoint firewall policy centrally from Cortex XDR, without a separate firewall agent.

### What you can configure

* **Action:** Allow or Block.
* **Direction:** Inbound, Outbound, or Both.
* **Protocol:** TCP, UDP, ICMPv4, ICMPv6, or a custom protocol number.
* **Addresses and ports:** Local and remote IP addresses or ranges, and ports.
* **Application:** Limit a rule to specific applications or services. Options depend on the platform.
* **Location:** Use separate **Internal** and **External** rule groups, depending on whether the endpoint is on your corporate network.

Rules are organized into rule groups and enforced in priority order, from top to bottom.

### Location-based rules

To apply different rules on and off the corporate network, enable **network location configuration** in the Agent Settings profile, and enable **Location Based** in the host firewall profile. The agent re-evaluates its location at each heartbeat and when it detects a network change. If **Location Based** is disabled, the internal rules apply everywhere.

{% hint style="warning" %}
On Windows, enforcing Cortex host firewall rules takes control from Windows Firewall. On macOS, disabling or removing the Cortex host firewall policy also disables the system firewall.
{% endhint %}

See [Host firewall](https://cortex-docs.paloaltonetworks.com/cortex-xdr-5.x/protect-your-endpoints/install-and-manage-endpoints/harden-endpoint-security/host-firewall), [Host firewall for Windows](https://cortex-docs.paloaltonetworks.com/cortex-xdr-5.x/protect-your-endpoints/install-and-manage-endpoints/harden-endpoint-security/host-firewall/host-firewall-for-windows), and [Host firewall for macOS](https://cortex-docs.paloaltonetworks.com/cortex-xdr-5.x/protect-your-endpoints/install-and-manage-endpoints/harden-endpoint-security/host-firewall/host-firewall-for-macos).


---

# 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/cortex-xdr/insights-and-tips-cortex-xdr/security-operations-and-response/host-firewall-overview.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.
