Everyday PAN-OS CLI commands for Palo Alto Networks firewalls and Panorama, checked against Palo Alto's PAN-OS CLI Quick Start for PAN-OS 11.1 and later and its PAN-OS 11.1 command hierarchy. The CLI opens in operational mode; configure enters configuration mode, where changes stay in the candidate configuration until commit. Capitals stand for your own values, and ? lists the options at any point. Niche topics such as LSVPN, lockless QoS and CTD decoding are left out.
152 commands in 15 sections.Checked row by row against Palo Alto Networks on .Edited by Jay.
Modes and help 15
show commands work in configuration mode as well; any other operational command needs run in front of it there.
Command
What it does
configure
Enter configuration modeThe prompt changes from > to #; every login starts in operational mode.
exit
Return to operational modequit does exactly the same, and the prompt switches back to >.
run COMMAND
Run an operational commandKeeps you at the # prompt, as in run ping host 10.1.1.2.
find command
List every available commandWithout parameters it prints the full hierarchy for whichever mode you are in.
find command keyword KEYWORD
Search commands by keywordReturns every command whose syntax contains the word, such as username.
?
Show syntax helpType it after part of a command to list the options, values and nested commands at that point.
Tab
Complete a commandCompletion is switched off while scripting mode is on, and so is ? help.
COMMAND | match VALUE
Filter output by a valuePrints only matching lines, for example show system info | match app-version.
COMMAND | except VALUE
Hide lines with a valueShows everything else, as in show user group list | except ou=acme.
set cli scripting-mode on
Turn on scripting modeLets long blocks of pasted commands through; Tab completion and ? help stay off meanwhile.
set cli scripting-mode off
Turn off scripting modeBrings back Tab completion and ? help once pasting is done.
set cli config-output-format set
Show configuration as set commandsMakes a section of configuration easy to copy and paste into another device's CLI.
set cli pager off
Turn the CLI pager off
set system setting target-vsys VSYS-NAME
Switch to one virtual systemThe prompt then shows the vsys name, which is case sensitive.
set system setting target-vsys none
Leave the vsys contextAfterwards commands act on the firewall as a whole rather than on one vsys.
Editing the configuration 8
When pasting set commands from another device, configure objects such as zones, security profiles and address groups before the rules that refer to them.
Command
What it does
edit deviceconfig system ntp-servers
Move into the NTP servers nodeThe prompt shows the new location, and set commands there need only the remaining path.
up
Go up one level
top
Jump to the hierarchy top
delete deviceconfig system ntp-servers secondary-ntp-server ntp-server-address
Delete the secondary NTP serverUnlike the web interface, the CLI does not check whether a deleted object is still referenced.
show config running
Show the running configurationPiping it through | match finds every place an object is used before you delete it.
show config candidate
Show the candidate configuration
show config diff
Show configuration differences
check pending-changes
Check pending changes
Committing changes 8
Command
What it does
commit
Commit all changesConfiguration commands take effect only after this, since they edit the proposed configuration.
commit partial device-and-network excluded
Commit only policy and objectsSuits a change to Security policy alone, leaving device and network edits uncommitted.
Commit one administrator's changesThis example commits only what jsmith changed in vsys1 and in shared objects.
validate full
Validate the configurationOptional but recommended before a commit; it runs as a job whose result show jobs id displays.
show jobs id JOB-ID
Show one job's detailsAlso works for validate jobs, listing their result and warnings such as application dependencies.
show jobs all
List all jobsIncludes queue positions and job IDs for pending, running, finished and failed commits.
show jobs processed
List completed jobsCovers finished commits, downloads and upgrades.
Ctrl+C
Free the prompt during a commitThe commit keeps running in the background while you type other commands.
Initial setup 20
These are starting points in the configuration hierarchy. On a firewall with multiple virtual systems, vsys-specific settings go under set vsys NAME and shared ones under set shared.
Command
What it does
set deviceconfig system ip-address
Set the MGT interfaceTakes the address in IP/netmask form; netmask and default-gateway are separate settings beside it.
set mgt-config users admin password
Set the admin password
set deviceconfig system dns-setting servers
Set the DNS serversTakes a primary and a secondary server address.
set deviceconfig system ntp-servers
Set the NTP serversHolds primary-ntp-server and secondary-ntp-server, each with its own ntp-server-address.
set deviceconfig system hostname HOSTNAME
Set the hostname
set deviceconfig system
Configure system settingsHostname, management address, DNS, NTP and SSH options all live under this node.
set network interface
Configure interfacesEthernet, aggregate-ethernet, loopback, tunnel and VLAN interfaces are all defined below it.
set zone NAME
Configure a zoneThe general location; firewalls with multiple virtual systems use the vsys form instead.
set vsys NAME zone NAME
Configure a zone in one vsys
set rulebase
Configure policy rulesSecurity and NAT rules sit below it; a multi-vsys firewall uses set vsys vsys1 rulebase.
set profiles
Configure security profilesCovers security profiles plus HIP objects and profiles, URL Filtering and WildFire Analysis profiles.
set shared server-profile
Configure shared server profiles
set shared authentication-profile
Configure authentication profiles
set shared certificate-profile
Configure certificate profiles
set user-id-collector
Configure User-ID collection
set deviceconfig high-availability
Configure high availabilityIts enabled option takes yes or no, while group and interface hold the HA settings.
set deviceconfig setting management quota-settings
Set log quotas
set deviceconfig setting autofocus
Configure AutoFocus
set deviceconfig setting wildfire
Configure WildFire settings
set deviceconfig system panorama-server
Point the firewall to PanoramaThe PAN-OS 11.1 firewall hierarchy places this under panorama local-panorama panorama-server.
System information 8
Command
What it does
show system info
Show system informationLists hostname, management IP, model, serial number, PAN-OS version and content versions.
show system disk-space files
Show disk partition usageThe files option adds inode counts, which track file storage.
show system resources
Show management-plane resourcesCovers the management plane only; show running resource-monitor reports on the dataplane.
show running resource-monitor
Show dataplane resource use
show system software status
Show software process status
show system logdb-quota
Show log database quota
request license info
Show installed licenses
show ntp
Show NTP status
Sessions and policy tests 12
Command
What it does
show session info
Show session statisticsReports session counts, table utilization, packet rate, throughput and session timeouts.
show session id SESSION-ID
Show one session in detail
show session all
List all sessionsAccepts filters such as source, destination, application and rule to narrow the list.
show session meter
Show vsys session limitsGives maximum, current and throttled session counts for each virtual system.
show running security-policy
Show running security policy
test security-policy-match application APPLICATION source-user USER destination DESTINATION destination-port PORT source SOURCE protocol PROTOCOL
Test a Security rule matchPrints the rule the described traffic would match, with its full definition and action.
test authentication-policy-match from trust to untrust source SOURCE destination DESTINATION
Test an Authentication rule matchShows the matched rule and its action, such as web-form.
test decryption-policy-match category CATEGORY from trust source SOURCE destination DESTINATION
Test a Decryption rule matchChecks whether traffic to a URL category would be decrypted under your rules.
test nat-policy-match
Test a NAT rule match
show running nat-policy
Show the NAT policy
show running ippool
Show NAT pool usage
show counter global
Show global countersNarrow it with | match, for example | match bfd for BFD packet counters.
Interfaces and routing 12
Command
What it does
show interface all
Show all interfacesName one interface instead, or ask for management, hardware or logical interfaces only.
show mac all
Show the MAC table
show routing route
Show the routing tableFirewalls that use Advanced Routing have show advanced-routing route instead.
show routing fib virtual-router NAME
Show forwarding entriesAdd | match with a prefix to see the route chosen for one destination.
show advanced-routing route
Show the Advanced Routing RIBOptions such as afi, destination and logical-router narrow the listing.
show advanced-routing fib
Show the Advanced Routing FIB
show advanced-routing bgp summary logical-router LOGICAL-ROUTER-NAME
Show a BGP summary
show system setting arp-cache-timeout
Show the ARP cache timeout
set system setting arp-cache-timeout SECONDS
Set the ARP cache timeoutAccepts 60 to 65536 seconds in place of the default 1800.
ping host IP-ADDRESS
Ping from the MGT interfaceAdd source with a dataplane address to send the pings from a traffic interface.
ping source IP-ADDRESS host IP-ADDRESS
Ping using a dataplane sourceThe source must be an IP address configured on a dataplane interface.
show netstat statistics yes
Show network statistics
IPSec VPN 5
Command
What it does
show vpn flow
Show IPSec counters
show vpn gateway
List IPSec gateways
show vpn ike-sa
List phase 1 IKE SAs
show vpn ipsec-sa
List phase 2 IPSec SAs
show vpn tunnel
List auto-key tunnels
User-ID 15
Command
What it does
show user user-id-agent state all
Show Windows User-ID agents
show user server-monitor state all
Check the integrated User-ID agent
show user server-monitor statistics
Show syslog mapping statisticsCounts log messages received from syslog senders and the entries mapped from them.
show user user-id-agent config name AGENT-NAME
Show an agent's configuration
show user group-mapping state all
Show group mapping state
show user group-mapping statistics
Show group mapping statistics
show user group list
List mapped groups
show user group name GROUP-NAME
Show one group's mapping
show user ip-user-mapping all
Show all user mappingsPipe it through | match with a username; a domain prefix needs two backslashes before the user.
show user ip-user-mapping ip IP-ADDRESS
Show the mapping for one IP
show user user-ids
Show known usernames
show log userid datasourcename equal AGENT-NAME direction equal backward
Show recent mappings from an agent
show log userid datasourcetype equal kerberos
Show Kerberos-learned mappingsSwap kerberos for another service type such as globalprotect, ntlm or client-cert.
Show HA cluster statisticsIncludes received-message counts and dropped packets broken down by reason.
clear high-availability cluster statistics
Reset HA cluster statistics
show high-availability cluster flap-statistics
Show HA cluster flap countsThe count resets when a device moves between suspended and functional, or when the non-functional hold time expires.
request high-availability cluster sync-from
Resync the session cache
Logs 6
Command
What it does
show log traffic
Show traffic logsFilters such as direction equal, csv-output equal and query equal follow the log type.
show log threat
Show threat logs
show log system
Show system logs
show log config
Show configuration logs
less mp-log authd.log
Read the authentication log
show logging-status
Show log forwarding statusOn a firewall it also counts the logs forwarded; on Panorama add device and a serial number.
Panorama 11
Command
What it does
show system info | match system-mode
Show the appliance mode
request system system-mode logger
Switch to Log Collector modeReboots the M-Series appliance and wipes logs and all settings except management access.
request system system-mode panorama
Switch to Panorama modeAlso moves a Panorama virtual appliance out of Legacy mode.
set panorama off
Disconnect from PanoramaEntered on the firewall CLI; set panorama on restores the connection.
set panorama on
Reconnect to Panorama
show devicegroups name DEVICE-GROUP-NAME
Show device group statusGives commit history and Panorama connection status for each firewall in the group.
show templates name TEMPLATE-NAME
Show template statusThe template counterpart, with commit history and connection state per firewall.
show config pushed-shared-policy
Show policy pushed by PanoramaRun it on the firewall to see the rules and objects Panorama has sent.
show config pushed-template
Show settings pushed by templatesAlso a firewall-side command, listing pushed network and device settings.
request batch reboot devices SERIAL-NUMBER
Reboot managed firewallsUse log-collectors in place of devices to reboot Dedicated Log Collectors.
debug log-collector log-collection-stats show incoming-logs
Show the incoming log rate
Management access 7
Command
What it does
show admins
Show logged-in administratorsCovers sessions in the web interface, the CLI and the API.
show admins all
Show all administrator accountsIncludes local, remote and Panorama-pushed admins, logged in or not.
set deviceconfig setting management idle-timeout VALUE
Set the admin idle timeoutApplies to web interface and CLI sessions alike; 0 means never, otherwise 1 to 1440.
test authentication authentication-profile PROFILE username USERNAME password
Test an authentication profilePrompts for the password, then traces each step of the request to the authentication server.
show ssh-fingerprints format hex hash-type md5
Show SSH host key fingerprintsPick the format and hash type your SSH client uses; md5 is not available in FIPS-CC mode.
set deviceconfig system ssh regenerate-hostkeys mgmt key-type ECDSA key-length 256
Regenerate the SSH host keyName the default key type in use; regenerating any other type has no effect.
set ssh service-restart mgmt
Restart SSH on the management portRun it in operational mode after committing SSH profile or host key changes.
Backups and file transfer 6
The Panorama virtual appliance (Panorama 6.0 and later), M-Series appliances and PA-7000 Series firewalls do not support scp export logdb or scp import logdb, because their log databases are too large.
Command
What it does
save config to FILENAME
Save a configuration snapshotRuns in configuration mode and creates a named file that scp export configuration can copy off the device.
scp export configuration from FILE to USERNAME@HOST:PATH
Export a saved configurationAsks for the SCP server password; a Windows server path needs a drive letter and colon.
scp import configuration from USERNAME@HOST:PATH
Import a saved configurationRun on the receiving firewall, then load what you need from the imported file.
scp export logdb to USERNAME@HOST:PATH
Export the log databasePrompts for the SCP account password; on a Windows server begin the path with a drive letter.
scp import logdb from USERNAME@HOST:PATH
Import a log databaseRun it on the firewall that should receive the logs, again with the SCP password.
Load part of a configurationXPath formats differ for multi-vsys, single-vsys and Panorama; append and replace are the other modes.
Software and maintenance 8
Command
What it does
request system software check
Check for PAN-OS updates
request system software info
Show PAN-OS software info
request system software download version VERSION
Download a PAN-OS version
request system software install version VERSION
Install a PAN-OS version
request content upgrade check
Check for content updates
request content upgrade download latest
Download the latest content
request content upgrade install version latest
Install the latest content
request restart system
Restart the deviceAn operational-mode command, so give it at the > prompt rather than in configuration mode.
No row on this page matches that filter.
Questions
How do I switch between operational and configuration mode?
Type configure at the > prompt and the prompt changes to #. exit or quit takes you back. Inside configuration mode, run COMMAND runs an operational command without leaving, and show commands work in both modes.
Do these commands take effect immediately?
Operational commands such as request restart system run at once. Configuration commands such as set, edit and delete only change the candidate configuration: check it with validate full, then apply it with commit, or with commit partial device-and-network excluded to apply policy and objects alone.
How do I find a command when I only know part of it?
find command keyword KEYWORD lists every command that contains the word, and find command on its own prints the whole hierarchy of the current mode. Typing ? after a partial command shows the options at that level, and Tab completes what you have started.
Why are some pasted configuration lines cut off?
Without scripting mode the SSH buffer takes only about 20 pasted lines. set cli scripting-mode on enlarges it considerably; Tab completion and ? help stay unavailable until set cli scripting-mode off.
How do I copy configuration from one firewall to another?
For a section, run set cli config-output-format set, show that part of the configuration and paste the resulting set lines on the second device, objects before the rules that use them. For a whole snapshot, run save config to FILENAME, export it with scp export configuration from FILE to USERNAME@HOST:PATH, import it on the other firewall and load the part you need with load config partial.
Which PAN-OS version do these commands come from?
From the PAN-OS CLI Quick Start for PAN-OS 11.1 and later and its PAN-OS 11.1 command hierarchy. The guide is not fully consistent: its Jump Start gives set deviceconfig system panorama-server, while the 11.1 firewall hierarchy nests that setting under panorama local-panorama, and the Panorama cheat sheet writes config-output-mode where the hierarchy has only set cli config-output-format set.