Steve Borba

My notes, I hope they help you, feel free to comment/add to them

Palo Alto Config Compare

Sometimes I do a change that causes a lot of config change, especially with re-ordering of the config.

This will download config from the device, then you commit and download again, and then SORT! and compare. I usually do this on the stand-by device, and evaluate if I should do on the primary.

panxapi.py -h 192.0.2.1 -jg "/config" > pre.json
<push the config from Panorama>
panxapi.py -h 192.0.2.1 -jg "/config" > post.json
vimdiff -c TOhtml -c "w diff.html | qa!" <(jq --sort-keys . pre.json | grep -v "ptpl" ) <(jq --sort-keys . post.json | grep -v "ptpl")

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>