View on GitHub

panco

Command-line tool that interacts with Palo Alto firewalls and Panorama

Finding Duplicate Address and Service Objects

Usage:
  panco objects duplicates [flags]

Flags:
  -d, --device string        Device to connect to
  -g, --devicegroup string   Device Group name when exporting from Panorama (default "shared")
  -f, --file string          Name of the output file (you don't need an extension) (default "PaloAltoDuplicates")
  -h, --help                 help for duplicates
  -t, --type string          <address|service|all>
  -u, --user string          User to connect to the device as
  -v, --vsys string          Vsys name when exporting from a firewall (default "vsys1")

Overview

Finding duplicate address and service objects is a quick and easy task with this command. You can choose either address or service objects to find duplicates on, or both. When specifying either option, an Excel file is created which includes the results in separate tabs. For example, to find all duplicate address and service objects, run the following command:

panco objects duplicates --type all --file Duplicate-Objects --vsys vsys1

What this will do is create a file called Duplicate-Objects.xlsx which will have four tabs:

The duplicates are found based on the value of the object. So for example, if you have two objects with the same IP address:

Either one can show up in the duplicates tab. You’ll just have to figure out which one you want to take action on.