Skip to main content

PAN-OS ZTP Patcher

The PAN-OS ZTP Patcher is a sophisticated Python utility designed to automate content version updates on PAN-OS firewalls during the Zero Touch Provisioning (ZTP) process. Utilizing a Raspberry Pi, this tool helps network administrators ensure their firewalls are always updated with the latest security features without manual intervention.

Use Case

Deploying PAN-OS firewalls typically requires ensuring they are updated with the latest content versions, including threat signatures and application definitions. The PAN-OS ZTP Patcher automates these updates during the ZTP process, interfacing directly through a Raspberry Pi connected to the firewall's management interface.

Key Benefits

  • Automated Content Updates: Streamlines the ZTP process by automating updates, reducing time and effort.
  • Enhanced Security: Ensures that firewalls receive the latest updates immediately upon deployment.
  • Reduced Human Error: Minimizes the risks associated with manual updates.
  • Efficient Deployments: Speeds up the setup process for PAN-OS firewalls with up-to-date configurations.

Requirements

  • Raspberry Pi with the latest OS and Python 3.7 or higher.
  • USB to Ethernet adapter connecting the Raspberry Pi to the firewall's management interface.
  • Configured network settings on the Raspberry Pi's Ethernet interface to 192.168.1.2/24.

Installation

Install the PAN-OS ZTP Patcher via pip:

pip install pan-ztp-patcher

Usage

Run the ZTP Patcher with the following command structure, providing the necessary parameters:

Parameters

  • --env_file: Path to the .env file containing environment variables (default: .env).
  • --pi_hostname: Hostname or IP address of the Raspberry Pi.
  • --pi_username: Username for the Raspberry Pi.
  • --pi_password: Password for the Raspberry Pi.
  • --pan_hostname: Hostname or IP address of the PAN-OS firewall.
  • --pan_username: Username for the PAN-OS firewall.
  • --pan_password_new: New password to be set for the firewall user.
  • --pan_password_old: Current password for the firewall user.
  • --content_path: Path on the Raspberry Pi where the content file is located.
  • --content_version: Name of the content file to be installed.
  • --log_level: Set the log level for the application; options are "DEBUG", "INFO", "WARNING", "ERROR" (default: "INFO").

Example Commands

Execute with an .env file in the current working directory:

ztp_patcher --env_file .env

Execute by passing all values as arguments instead:

ztp_patcher \
--pi_hostname <pi_hostname> \
--pi_username <pi_username> \
--pi_password <pi_password> \
--pan_hostname <pan_hostname> \
--pan_username <pan_username> \
--pan_password_new <new_password> \
--pan_password_old <old_password> \
--content_path <content_path> \
--content_version <content_version> \
--log_level <log_level>

Operational Steps

  1. Changes the specified user's password on the PAN-OS firewall.
  2. Retrieves the API key using the new credentials.
  3. Imports and installs the content update from the Raspberry Pi using SCP.
  4. Monitors the status of the content update job until completion.

Ensure proper connectivity and configurations are set before initiating the ZTP Patcher.

Contributing

Contributions are welcome. Please fork the repository, make your changes, and submit a pull request.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for more details.

Metadata

Release files for pan-ztp-patcher 0.2.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pan-ztp-patcher 0.2.10
File Size Uploaded Provenance
pan_ztp_patcher-0.2.10.tar.gz 14.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pan-ztp-patcher 0.2.10
File Interpreter ABI Platform
pan_ztp_patcher-0.2.10-py3-none-any.whl Python 3 none any Details

Total release size: 29.7 kB

Release files / pan_ztp_patcher-0.2.10.tar.gz

Download URL pan_ztp_patcher-0.2.10.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
22285fa596e89b7ed0c162ca0cfde316759cf270beb1367ca01bf21b651bd16a
BLAKE2b-256 checksum
How to use checksums
0fbc6143ee4900391079c7e2d0aba9a776322e6f9feee732b6687e5473c0e796
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.3 Linux/6.5.0-1018-azure

Release files / pan_ztp_patcher-0.2.10-py3-none-any.whl

Download URL pan_ztp_patcher-0.2.10-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec5801bb8690f2ffe451761c3ce3a7a915204c4c1eb09078e46a72f4ab23e501
BLAKE2b-256 checksum
How to use checksums
04ec719ba95bfd49958464ce6b6f89aa797a3bd88df967c666f8e74d95985672
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.3 Linux/6.5.0-1018-azure

Security for pan-ztp-patcher 0.2.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page