GlobalProtect Gateway Exclude Access Route and Domains

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

GlobalProtect Gateway Exclude Access Route and Domains

L1 Bithead

We need to dynamically update the GP gateway exclude access routes and exclude domains.  Trying to find the XPATH for the list members.  Below is what I have but I can't get to the actual items in the lists.

 

/config/devices/entry[@name='localhost.localdomain']/template/entry[@name='TEMPLATE']/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/global-protect/global-protect-gateway/entry[@name='GATEWAY']/remote-user-tunnel-configs/entry[@name='AGENT']/split-tunneling/exclude-access-route

 

I need to add members to this XPATH.

1 accepted solution

Accepted Solutions

Here is the actual URL for updating the exclude access list.

 

/api/?type=config&action=set&xpath=/config/devices/entry[@name=\'localhost.localdomain\']/template/entry[@name=\'TEMPLATENAME\']/config/devices/entry[@name=\'localhost.localdomain\']/vsys/entry[@name=\'vsys1\']/global-protect/global-protect-gateway/entry[@name=\'GATEWAYNAME\']/remote-user-tunnel-configs/entry[@name=\'AGENTCONFIGNAME\']/split-tunneling/exclude-access-route&element=<member>11.11.16.0/24</member>'

View solution in original post

5 REPLIES 5

L5 Sessionator

From what I can see, your xpath is good.  This location is a member, so if you're just wanting to add stuff to this location, then do a set with this as the element:

 

 

<exclude-access-route>
    <member>thing1</member>
    <member>thing2</member>
</exclude-access-route>

 

 

For set operations, you need to stop a xpath part above, so end the xpath location at "split-tunneling". 

What would the format be for the URL for use with urllib?

Here is the actual URL for updating the exclude access list.

 

/api/?type=config&action=set&xpath=/config/devices/entry[@name=\'localhost.localdomain\']/template/entry[@name=\'TEMPLATENAME\']/config/devices/entry[@name=\'localhost.localdomain\']/vsys/entry[@name=\'vsys1\']/global-protect/global-protect-gateway/entry[@name=\'GATEWAYNAME\']/remote-user-tunnel-configs/entry[@name=\'AGENTCONFIGNAME\']/split-tunneling/exclude-access-route&element=<member>11.11.16.0/24</member>'

Hello, sir

if I want to add several members ? It's possible todo in one api request?

 

for example - ... /exclude-access-route&element=<member>11.11.16.0/24</member>&element=<member>12.12.17.0/24</member>&element=<member>13.13.17.0/24</member>

?

Hi @NikKaretko,

 

You can specify multiple members in the element portion, so instead of 

&element=<member>11.11.16.0/24</member>&element=<member>12.12.17.0/24</member>&element=<member>13.13.17.0/24</member>

 

Use:

&element=<member>11.11.16.0/24</member><member>12.12.17.0/24</member><member>13.13.17.0/24</member>

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂
  • 1 accepted solution
  • 6083 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!