Adding address objects and tagging them via CLI.

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

Adding address objects and tagging them via CLI.

L3 Networker

In my network we tag certain IP addresses for various reasons on our Palo Alto's. Sometimes we will get a large batch of these that need to be done and manually creating an address object and then tagging it via the GUi can be time consuming (to say the least).

 

I'm wondering if there is a way to add these object groups and tag them via the CLI.

 

I'm running a Panorama with an HA pair of physical boxes if that makes a difference.

 

Thanks.

1 accepted solution

Accepted Solutions

L3 Networker

I ended up using this method:

 

set cli config-output-format set
configure

set device-group <device_group_name > address < address_object_name> ip-netmask <ip_address/netmask>
set device-group < device_group_name> address < adsdress_object_name > tag <tag_name>

 

Thanks!

View solution in original post

4 REPLIES 4

Community Team Member

Hi @Gareth.Doyle,

 

I think you want to use the set address / address-group commands in CLI (in configuration mode) :

 

 

> configure

# set address
# set address <name> tag  [ <tag1> <tag2>... ]
# set address-group <name> tag  [ <tag1> <tag2>... ]

 

Hope this helps !

-Kiwi.

LIVEcommunity team member, CISSP
Cheers,
Kiwi
Please help out other users and “Accept as Solution” if a post helps solve your problem !

Read more about how and why to accept solutions.

Cyber Elite
Cyber Elite

Have you considered using API to inject these IPs in tagged dynamic objects?

 

Register IP Addresses and Tags Dynamically

 

Sample API workflow for Dynamic Address Objects

Tom Piens
PANgurus - Strata specialist; config reviews, policy optimization

L3 Networker

Like this

 

 

set vsys vsys1 address <address object> tag <tag> ip-netmask x.x.x.x/32

And if you want to add it to a group

 

set address-group <address group> <address object>

 

L3 Networker

I ended up using this method:

 

set cli config-output-format set
configure

set device-group <device_group_name > address < address_object_name> ip-netmask <ip_address/netmask>
set device-group < device_group_name> address < adsdress_object_name > tag <tag_name>

 

Thanks!

  • 1 accepted solution
  • 17577 Views
  • 4 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!