Skip to content
Export guide · Firewalls and network

How to export your Palo Alto Networks PAN-OS configuration, and what we check in it

Where you run it: PAN-OS web interface, or the PAN-OS XML API with curl in a bash terminal (macOS, Linux or WSL; in Windows PowerShell 5.1, curl is a different command).

In short

Palo Alto Networks PAN-OS configuration export: the file Palo Alto Networks PAN-OS writes of its own settings, which a configuration review reads setting by setting without connecting to Palo Alto Networks PAN-OS.

How to export the Palo Alto Networks PAN-OS configuration, step by step, what the review checks in the file (50 checks run), and what it does not read.

The fileXML, one running-config.xml: the firewall’s running configuration, starting with <?xml and a <config …> element
Checks run on it50
Highest grade its findings reachPROVEN
Feeds attack pathsYes
Not read from this export6 areas, listed below

Sources: Palo Alto Networks PAN-OS documentation (1); Palo Alto Networks PAN-OS documentation (2); Palo Alto Networks PAN-OS documentation (3); the vendor table.

How to export it

Who can pull it
The predefined Superuser role. Palo Alto: "Only administrators with the predefined Superuser role can export or import firewall configurations and shut down the firewall." No narrower role is documented for this export. For the API route the role must also have the XML API enabled. Superuser (read-only) is described as "Read-only access to the firewall (enables the XML API in a read-only state)", and Palo Alto does not say whether that role, or a custom Admin Role profile, may run the API export: if the export answers with an error instead of the file, have a Superuser run it.
Time
About 5 minutes per firewall.
The file
XML, one running-config.xml: the firewall’s running configuration, starting with <?xml and a <config …> element

In the Palo Alto Networks PAN-OS console

  1. Web interface: Device → Setup → Operations → Export named configuration snapshot → choose running-config.xml → OK, and upload the running-config.xml it downloads

    The vendor's page, checked 2026-11-11

Or from the command line

  1. Or with the XML API, get an API key (sent with POST, so the password stays out of the URL): curl -sS -X POST "https://<firewall>/api/?type=keygen" --data-urlencode 'user=<user>' --data-urlencode 'password=<password>'and copy the value between <key> and </key> in the answer

    The vendor's page, checked 2026-11-11
  2. curl -sS -H "X-PAN-KEY: <key>" "https://<firewall>/api/?type=export&category=configuration" -o running-config.xml(saves the answer as running-config.xml; upload that file. Palo Alto lists this request as the "Configuration" export and does not say which configuration it sends: if the review finds no rulebase in the file, use the web interface step)

    The vendor's page, checked 2026-11-11
  3. After the upload has gone through, end the API key: Palo Alto says "By default, the API key lifetime is set to 0, which means that the keys will never expire". In the web interface select Device → Setup → Management, edit Authentication Settings and select Expire all API Keys. Palo Alto: "Revoking keys is a way to expire all currently valid keys", so this ends every API key on the firewall and other tools that use one need a new key. To limit how long later keys last, set API Key Lifetime (min) in the same settings and commit. Palo Alto’s API key page also lists "The user's password changes" among the events that invalidate generated API keys, in its section on the API key certificate.

    The vendor's page, checked 2026-11-11

What the file looks like

XML, one running-config.xml: the firewall’s running configuration, starting with <?xml and a <config …> element. It varies with the firewall: the file grows with its rules, objects and security profiles. The upload takes files up to 10 MB.

What it holds: Security and NAT rulebases, zones, address and service objects, security profiles, and the management and admin settings.

The command-line interface (CLI) prints configuration in a brace format by default, and its xml format is wrapped in <response> (Palo Alto: set cli config-output-format). The upload reads neither, so do not paste the output of show config running: use the export above.

Afterwards

Delete running-config.xml from your computer after the upload. If you made an API key, end it: Device → Setup → Management → Authentication Settings → Expire all API Keys. Palo Alto warns that with this "all existing keys are rendered useless", so other tools need a new key. Remove the keygen line from your shell history: it holds the password.

If the export goes wrong

What you seeThe fix
The upload says the file does not match any expected format, or the review finds no security rulesThe file is not the running configuration (for example a candidate snapshot, or a device state bundle). Export running-config.xml again (Device → Setup → Operations → Export named configuration snapshot → running-config.xml), or use the API export, and upload that file.
The keygen answer is an error (for example 403) instead of a <key>Palo Alto lists 403 as "Authentication or authorization errors including invalid key or insufficient admin access rights". Check the user name and password by signing in to the web interface with them, and that this administrator’s role has the XML API enabled (Device → Admin Roles → XML API tab). Then run the keygen line again; if a password holds a single quote, type it as '\'' inside the quotes.
The keygen or export line prints curl: (60) SSL certificate problem: self signed certificate (or self-signed certificate), or the keygen line prints nothing at allThe firewall uses its own self-signed management certificate (Palo Alto: "By default, PAN-OS uses a self-signed certificate, so you will need to use -k parameter with cURL requests"). Add -k to both curl lines, for your own firewall’s address and no other, or install a management certificate your computer trusts.

What we read from it

Checks run
50
Formats read
PAN-OS XML running config (export) · `set`-format export
Releases
10.1 to 11.2.x

Checks run is the number of checks that reached a result on this system's own export in our tests, as the vendor table shows it.

The areas checked

  • Security rules: any-any-any allows, App-ID use, logging at session end, Security Profile groups
  • Decryption rules and decryption profiles
  • Management access: Telnet and HTTP, Permitted IPs, TLS versions, idle timeout, login banner
  • Admin accounts and password rules: superuser roles, length, complexity, history, expiry, lockout
  • Zone Protection, User-ID, GlobalProtect sign-in, update schedules, NTP, SNMP, and whether high availability (HA) checks its links and paths

The grade its findings reach

Proven A finding from this file can reach PROVEN: the stored file is read a second time by a separate reader, and the finding is found at the setting it names.

Its findings feed attack paths: each one can be a step on a path an attacker could take to your crown jewels.

Attack paths, the one change and dollar figures are MODELED. How each grade is worked out is on the method page.

What we do not read from this export

  • Hit counts, so unused rules are not found
  • Address and service object contents in depth
  • Rule descriptions
  • Logs and traffic: this is the configuration and nothing else
  • Settings pushed from Panorama (device groups and templates): not in this export (Export device state includes them; that bundle is not read)

Limits of the reader

  • A Panorama export (device groups, templates, or shared pre- and post-rules with no firewall rulebase) is refused: upload running-config.xml from each firewall.
  • A firewall managed by Panorama: the rules and settings Panorama pushes to it are not in its export, so its review is partial.
  • Pre- and post-rules in a firewall export are read in file order, not in the order the firewall applies them, so the review is partial.
  • Security profile groups are read by name. The profiles inside a group are not checked.
  • If your export leaves a section out, the review does not flag it as partial.
  • Some checks of this system are in the code and not counted: no test shows them firing on a file in the layout the vendor documents.

A finding never comes from what the file does not hold: live traffic, running hosts and logs are not in a configuration export.

Questions

Who can export the Palo Alto Networks PAN-OS configuration?

The predefined Superuser role. Palo Alto: "Only administrators with the predefined Superuser role can export or import firewall configurations and shut down the firewall." No narrower role is documented for this export. For the API route the role must also have the XML API enabled. Superuser (read-only) is described as "Read-only access to the firewall (enables the XML API in a read-only state)", and Palo Alto does not say whether that role, or a custom Admin Role profile, may run the API export: if the export answers with an error instead of the file, have a Superuser run it.

Does the export change anything?

The web interface export creates nothing on the firewall; Palo Alto’s documentation does not say whether an export is logged. The API route creates an API key for that administrator, and Palo Alto says "By default, the API key lifetime is set to 0, which means that the keys will never expire".

Does the file hold passwords or keys?

Palo Alto: "A master key encrypts all private keys and passwords in a configuration", every firewall "has a default master key", and "The default master key is publicly known and poses a critical security risk". So on a firewall that still uses the default master key, treat every key and password in the file as readable by anyone who holds the file. With redaction on (the default), the passwords, keys and tokens the review recognises are replaced with a placeholder before anything is stored; the check before upload shows how many it found.