- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-14-2024 11:38 AM
We use the Permitted IP Addresses list (Panorama>Setup>Interfaces) to restrict access to Panorama to our public IPs. The problem we run into is that some of our devices use cellular as backup (new public IP every two days) or worse--Starlink (who change your public IP several times per day).
Since this list only uses IP, not DNS, I can't just use a dynamic DNS entries. My solution is to update the list manually every time I need to push a config. I'd like to use a script that makes API calls, but I can't find any documentation for the API calls that gets to anything in the Panorama>Setup area. Any idea where these commands might be hiding? Or is the API limited to only select commands? Maybe I need to just script accessing the CLI and editing it there, but I'm not sure I've seen those commands either...
06-14-2024 02:30 PM
Hi @JDBailey ,
The XPath you are looking for is shown below.
/api/?type=config&action=get&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/permitted-ip/entry[@name='172.16.0.0/12']
That example adds 172.16.0.0/12 with no description to the Permitted IP Addresses of the Panorama management interface.
There are a few ways to find an XML Path.
Thanks,
Tom
PS The CLI command is 'set deviceconfig system permitted-ip 172.16.0.0/12'.
06-14-2024 02:30 PM
Hi @JDBailey ,
The XPath you are looking for is shown below.
/api/?type=config&action=get&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/permitted-ip/entry[@name='172.16.0.0/12']
That example adds 172.16.0.0/12 with no description to the Permitted IP Addresses of the Panorama management interface.
There are a few ways to find an XML Path.
Thanks,
Tom
PS The CLI command is 'set deviceconfig system permitted-ip 172.16.0.0/12'.
06-14-2024 02:33 PM
Thank you! I've been looking for this for years, but every time I start my search some network emergency pulled me away. I'll give it a test and if it works, I'll accept the solution. Wasn't expecting a reply this week, honestly. You've made my week!
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!