- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
07-12-2018 08:05 AM
Hello Community,
we would use an API to see the output of show running nat-policy-addresses command for each vsys.
The following API work properly when on the firewall there is only one vsys.
https://<firewall-IP>/api/?type=op&cmd=%3Cshow%3E%3Crunning%3E%3Cnat-policy-addresses%3E%3C%2Fnat-policy-addresses%3E%3C%2Frunning%3E%3C%2Fshow%3E&key=<APIKEY>
We have multiple virtual system and we need to have the output for each vsys.
From CLI we get it with two different command:
>set system setting target-vsys <value>
and
>show running nat-policy-addresses
It seems there is no way to specify the vsys into this specific API call.
Do you know if is it possible to have this information?
Thanks in advance.
Jacopo
08-01-2018 09:11 AM - edited 08-01-2018 09:12 AM
Hope this helps.
Change the vsys to specific vsys number.
CLI:
show config running xpath devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/nat/rules
API:
"<show><config><running><xpath>devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/nat/rules</xpath></running></config></show>"
08-06-2018 01:36 AM
Hi @Sly_Cooper,
Thanks for your help. The API that you suggested retrive the NAT rulebase and not nat-policy-addresses.
We need to retrive the IP addresses and not the name of objects used into the NAT rules.
Thanks in advance.
Jacopo
08-09-2018 07:57 AM
You should be able to append "&vsys={vsys_name}" to your request to target a specific vsys
This should work for any op command in a multi-vsys system
08-21-2018 10:10 AM
@Jacopo_ViganoI have similar requirements and I am trying to solve the problem via python script (work in progress). I dont think there is any direct way to map address to ip.
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!