Net Assured

Net Assured

Network and Security Consultancy

T 07789 400408
Email: info@netassured.co.uk

Net Assured Limited
84 Goodacre, Orton Goldhay, Peterborough, PE2 5LZ

  • Home
  • Services
  • Blog
  • About
  • Contact
FREEQUOTE

Palo Alto Configuration Backup API Script

Monday, 11 July 2016 / Published in Automation, Networking

Palo Alto Configuration Backup API Script

This is the first post of many detailing the scripts I use to backup devices in my home lab. This post details a Palo Alto configuration backup API script. Eventually i’ll move to using Ansible but for now some simple scripts work nicely. Almost all the the backups in my lab are now automated.

The script will make an API call to Palo Alto Networks firewall(s) using curl to retrieve the running configuration. The script runs in a loop connecting to each firewall specified in a list. Once the script completes it reports back the total API connections, successes and failures to the user and a log file. Its easy to see how the script can be modified for other API functions. In this script the API key is hard coded to enable execution from a cron job. This might not be desirable in some circumstances unless you confine access to the device hosting the script.

I’ll publish another version shortly which prompts a user for credentials to remove the need to hard code the key in the script. This approach would prove a little tricky to automate though.

The code and documentation can be found on my GitHub account here: https://github.com/nickmoody/Palo-Alto-Config-Backups-API

 

Categories

  • Automation
  • Networking
  • Security
  • Starlink
  • Ubiquiti UniFi

NEWSLETTER SIGNUP

By subscribing to our mailing list you will always be updated with the latest news from us.

We never spam!

Menu

  • Home
  • Services
  • Blog
  • About
  • Contact
  • Privacy Policy
  • Cookie Policy

Get In Touch

T 07789 400408
Email: info@netassured.co.uk
NET ASSURED LIMITED
84 Goodacre | Orton Goldhay
Peterborough | PE2 5LZ
Company Registration: 9480811
VAT Registration: 207 5161 32
  • GET SOCIAL

© 2015 - 2026 Copyright by Net Assured Limited | All rights reserved

TOP
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behaviour or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}