Net Assured

Net Assured

Network and Security Consultancy

T 07789 400408
Email: nick.moody@netassured.co.uk

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

  • Consultancy
  • Blog
    • Automation
    • Certificates
    • Certifications
    • Lab
    • Security
    • Networking
    • The Bookshelf
    • Personal
  • About
  • Contact

Palo Alto Configuration Backup API Script

Monday, 11 July 2016 / Published in Automation, Lab, 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

 

Recent Posts

  • GNS3 VM on ESXi 802.1q link to external network

    This post details my experiences getting the GN...
  • Restore VMware ESXi Host Configuration

    This is a follow up post to the last one about ...
Tweets by nickpmoody
Follow @nickpmoody

Categories

  • Automation
  • Certificates
  • Certifications
  • Lab
  • Networking
  • Personal
  • Security
  • The Bookshelf
  • Uncategorized

Menu

  • Consultancy
  • Blog
  • About
  • Contact

Get In Touch

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

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

TOP