Test nat-policy rules API

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

Test nat-policy rules API

L0 Member

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:<test><nat-policy-match><source></source><destination></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 destination protocol 6 destination-port 123

Destination-NAT: Rule matched: Rule24 =>

In the CLI the request is successfull, but with API the result is the follow:


<response cmd="status" status="success">

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 

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!