Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
todd
Contributor

mgmt cli - How to negate an address object in adding an access-rule

Jump to solution

Hi Expert,

How to negate an address object in adding an access-rule from mgmt cli ?

I tried to add "!" but this is not working.

mgmt_cli -add access-rule layer "Network" position "top" source "!Intra-web-B" destination "Any" service "Any" action "Accept" --- not work!!

 

Thanks!

Todd

 

 

 

0 Kudos
2 Solutions

Accepted Solutions
PhoneBoy
Admin
Admin

Add a source-negate true to the command line instead of using an exclamation point.
See: https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-access-rule~v1.8%20

View solution in original post

(1)
the_rock
Champion
Champion

@PhoneBoy is 100% right @todd . I did this few times the way he advised you and works 100%. Let us know if any issues.

View solution in original post

0 Kudos
4 Replies
PhoneBoy
Admin
Admin

Add a source-negate true to the command line instead of using an exclamation point.
See: https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/add-access-rule~v1.8%20

(1)
the_rock
Champion
Champion

@PhoneBoy is 100% right @todd . I did this few times the way he advised you and works 100%. Let us know if any issues.

0 Kudos
todd
Contributor

Hi PhoneBoy, the_rock

It works!. Thank you!

mgmt_cli -add access-rule layer "Network" position "top" source-negate true source "Intra-web-B" destination "Any" service "Any" action "Accept"

Todd

the_rock
Champion
Champion

Good job!!

0 Kudos