Hi,
I am making call to rule base api and using filter to grab the matching rule for source destination and port.,however the issue is for some cases i am getting correct output where source destination and port is there but in some cases i am not getting the desired result.
i mean all other rule coming for destination but source is not coming in output.
I have one query for for using filer in packet mode do we required the live traffic on the gateway. can this packet mode filter will work on rulebase database without the live traffic.?
My api call-
- name: Checking rule base for source and destiantion
uri:
url: "https://{{mserver_hostname}}/web_api/show-access-rulebase"
validate_certs: False
method: POST
headers:
x-chkp-sid: "{{ login.json.sid }}"
body:
offset: 0
limit: 500
name: "Network"
details-level: "full"
use-object-dictionary: true
filter: "src:10.70.101.188 AND dst:10.9.17.65 AND svc:30000 AND action:6c488338-8eec-4103-ad21-cd461ac2c472"
body_format: json
register: rule_search
- set_fact:
rule_search_result: "{{rule_search | to_json}}"
- debug:
var: rule_search_result
and how to parse the output for specific source destination and port ?
Appreciate your help in advanced . I am totally stuck over here please help me.