load config partial - from local file to security ruleset

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

load config partial - from local file to security ruleset

L1 Bithead

First issue:

I am trying to get load config partial working from local file , address objects , address groups, service groups and security and NAT rules, to local firewall.  

 

I am used to doing load config partial on PANORAMA to device groups..  but not local file to local FW..  cant quite pin down the API XML format, even when looking on local API.. 

 

 

I know the xpath below is incorrect , but any advice on how to fix, would be greatly appreciated.  maybe a cheat sheet to reference for each section (address objects, add. groups, services, service groups, policies, nat policies..)

 

load config partial from MT-asdfkjh.xml from-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']rulebase to-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/post-rulebase/security mode merge

 

Second question:

any issues with version 9.0.4 ?  Or is there a more stable version currently?

 

Third question:

trying to use migration tool to set app ID on rules? Or create quickly app id rules above the service rules?

 

Thanks, 

T

1 accepted solution

Accepted Solutions

L4 Transporter

@achrist_2019 You had some mistakes in the xpath. It should be: 

 

load config partial from-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security to-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security from MT-asdfkjh.xml

 

Also note that in PanOS9 for some strange reason (looks like a bug to me) you have to put "from file" statement at the end of the command.

 

View solution in original post

3 REPLIES 3

L4 Transporter

@achrist_2019 You had some mistakes in the xpath. It should be: 

 

load config partial from-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security to-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security from MT-asdfkjh.xml

 

Also note that in PanOS9 for some strange reason (looks like a bug to me) you have to put "from file" statement at the end of the command.

 

Thank you BatD this worked like a charm.  If you don't mind, how did you find this in the XML API ? I am not able to locate the security portion, or address objects, services.. etc... not seeing where that is..

well how about that, I just figured it out.. thanks man.  Have a super weekend!

 

Annotation 2019-10-25 205455.png

 

 load config partial from-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address to-xpath /config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address from MT-asdfkljh.xml

  • 1 accepted solution
  • 5229 Views
  • 3 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!