Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

How to write a script for backup of initial settings of Palo alto firewall

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

How to write a script for backup of initial settings of Palo alto firewall

L1 Bithead

Hello everyone,

 

Please help me in writing a script for backup of initial settings of Palo alto firewall.

I am new in network security, requesting you to help me.

 

Br//

Ashutosh

5 REPLIES 5

L4 Transporter

@ashutosh321993 You can backup the running config of a firmware resetted Palo Alto by going to Device > System > Operations > Export named config > running config.

You get a xml-file with that config.

Why do you want to write a script for it?

Best Regards
Chacko

Cyber Elite
Cyber Elite

@ashutosh321993,

As @Chacko42 stated you can backup the configuration through the GUI with ease, utilize the CLI, script the interaction via the API, or utilize the pandevice Python library to grab a copy of the configuration. Do you actually need this to be a script or does the GUI work for what you are doing? 

Hi BPry,

 

Thanks for your reply!!

Actually writing a script is my project which is assigned to me. This is basically for taking the backup of those configuration which we have to do manually while replacing the firewall in network.

 

Actually I dont have any knowledge of scripting.Kindly guide me to complete this task.

 

Hi Chacko,

 

Thanks for your reply!!

Actually writing a script is my project which is assigned to me. This is basically for taking the backup of those configuration which we have to do manually while replacing the firewall in network.

 

Actually I dont have any knowledge of scripting.Kindly guide me to complete this task.


@ashutosh321993 wrote:

Hi BPry,

Actually I dont have any knowledge of scripting.Kindly guide me to complete this task.

 


If you haven't ever done anything via a script before I would recommend that you read up on your language of choice (Python being the most prevelant in networking) and then look into pandevice and requests. Pandevice will let you interact with the firewall via a Python module with a decent amount of documentation, and requests will let you make API calls in a python script. 

I have a personal rule against writing scripts and supplying them on this forum when people don't have experiance writing scripts themselves, and that's that I simply won't do it. If you were tasked with writing a script, you should actually do this yourself so that if it breaks in the future you actually know how to fix it. Not to mention, scripting is becoming a very desired skill on the job market, so it'll only help your future job outlook it you take the time now to learn how to do it. 

  • 5811 Views
  • 5 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!