- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
08-30-2018 04:12 AM - edited 08-30-2018 04:22 AM
Hi all,
I want to use the APIs to test if the source, destination, protocol and port that I've inserted, match with one of my NAT policy rules.
The complete request of the API that I've implemented is:
https://192.168.111.192/api/?type=op&cmd=<test><nat-policy-match><source>10.226.163.81</source><destination>10.227.248.113</destination><protocol>6</protocol><destination-port>123</destination-port></nat-policy-match></test>&key=<myKey>
and the Nat policy rule for the API request is:
Below, the same request via CLI:
user@ic-f-bih-1(active)> test nat-policy-match source 10.226.163.81 destination 10.227.248.113 protocol 6 destination-port 123 Destination-NAT: Rule matched: Rule24 10.227.248.113:123 => 10.10.1.85:123
In the CLI the request is successfull, but with API the result is the follow:
<response cmd="status" status="success"> <result> <rules> <entry/> </rules> </result> </response>
This happens only with rules that have Destination Translation filled. If the nat rule has Source translation filled, the response of the API query is successfull.
What I wrong with this API query? Thanks
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!