> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/p/palo-alto-pan-os.md).

# Palo Alto Pan OS

Pan-OS is the operating system of Palo Alto Networks firewalls. OctoXLabs reads the NAT rules of each virtual system and turns the hosts they translate into assets, marked as perimeter exposed when a rule publishes them to an external zone. It can also list physical firewalls managed by a Panorama target.

## Use cases

* List assets that come from Pan-OS.

```
Adapters = palo-alto-pan-os
```

## Before you begin

### Network

| Source              | Destination                             | Port               | Protocol                         |
| ------------------- | --------------------------------------- | ------------------ | -------------------------------- |
| OctoXLabs connector | Pan-OS firewall or management interface | 443 (configurable) | HTTPS (HTTP if Is Secure is off) |

### Required permissions

| Scope or role                                                                                                                         | Permission | Needed for                                    |
| ------------------------------------------------------------------------------------------------------------------------------------- | ---------- | --------------------------------------------- |
| Dynamic roles **Device admin (readonly)** and **Vsys admin (readonly)**, or role-based admin with **Device** and **Vsys** permissions | Read       | Virtual systems, NAT rules, security rules    |
| **XML API (Configuration)** permission                                                                                                | Read       | Physical firewalls (Fetch Physical Firewalls) |

## Create credentials in Palo Alto Pan-OS

{% stepper %}
{% step %}

### Create an admin

Create an administrator for OctoXLabs on the firewall.
{% endstep %}

{% step %}

### Assign the role for virtual systems

Give it the dynamic roles **Device admin (readonly)** and **Vsys admin (readonly)**. With role-based admins, give it the **Device** and **Vsys** permissions.
{% endstep %}

{% step %}

### Add XML API access for physical firewalls

If you turn on **Fetch Physical Firewalls**, also give the account the **XML API (Configuration)** permission.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                | Required | Type    | Default           | Description                                                                                                                                                         |
| ------------------------ | -------- | ------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IP                       | Yes      | String  |                   | IP address of the Pan-OS host.                                                                                                                                      |
| Port                     | No       | Integer | 443               | Port number.                                                                                                                                                        |
| Username                 | Yes      | String  |                   | Pan-OS account.                                                                                                                                                     |
| Password                 | Yes      | String  |                   | Password of the account.                                                                                                                                            |
| Is Secure                | No       | Boolean | True              | Use HTTPS.                                                                                                                                                          |
| Fetch Physical Firewalls | No       | Boolean | False             | Fetch physical firewalls as assets. Uses the XML API.                                                                                                               |
| Fetch Virtual systems    | No       | Boolean | True              | Fetch virtual systems as assets. At least one of the two fetch options must be on.                                                                                  |
| External Zones           | No       | List    | internet, untrust | Security zones that mean the Internet or untrusted side. NAT rules that touch one of them mark the asset as Internet Facing. Add your own names, for example `WAN`. |
| Timeout                  | No       | Integer | 30                | Seconds to wait for API responses.                                                                                                                                  |

## Troubleshooting

| Error message                                                                                             | Cause                                    | Fix                                                                              |
| --------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------- |
| At least one of fetch\_physical\_firewalls or fetch\_virtual\_systems must be True                        | Both fetch options are off.              | Turn on at least one option.                                                     |
| No physical firewalls found (API status: ); target is likely not a Panorama. Skipping physical firewalls. | The target did not return a device list. | Point the connection at a Panorama server, or turn off Fetch Physical Firewalls. |

## Change history
