Skip to main content

Update content version on PAN-OS firewalls

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pan_ztp_patcher-0.2.10.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

pan_ztp_patcher-0.2.10-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file pan_ztp_patcher-0.2.10.tar.gz.

File metadata

  • Download URL: pan_ztp_patcher-0.2.10.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.5.0-1018-azure

File hashes

Hashes for pan_ztp_patcher-0.2.10.tar.gz
Algorithm Hash digest
SHA256 22285fa596e89b7ed0c162ca0cfde316759cf270beb1367ca01bf21b651bd16a
MD5 0e3dbd5bff18e3f45d6182f71c942b2a
BLAKE2b-256 0fbc6143ee4900391079c7e2d0aba9a776322e6f9feee732b6687e5473c0e796

See more details on using hashes here.

File details

Details for the file pan_ztp_patcher-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: pan_ztp_patcher-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.5.0-1018-azure

File hashes

Hashes for pan_ztp_patcher-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 ec5801bb8690f2ffe451761c3ce3a7a915204c4c1eb09078e46a72f4ab23e501
MD5 520bc5fd9038088daf3449b38d61f7f3
BLAKE2b-256 04ec719ba95bfd49958464ce6b6f89aa797a3bd88df967c666f8e74d95985672

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page