Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Chancer
Participant

Error trying to create multiple ACL multiple using csv and mgmt_cli

Hi fellow Check Mates,

I'm getting an error message when trying to create multiple access control rules using mgmt_cli and referencing a csv file. This is being run on an MDS server hence the -d option

MDS  R81.40

api version : 1.8.1

Commands:

mgmt_cli login -r true -d xxx.xxx.xxx.xxx > id.txt

mgmt_cli login -r true -d xxx.xxx.xxx.xxx --batch filename.csv

 

Line 2: code: "generic_err_invalid_parameter_name"

message: "Unrecognized parameter [action]"

 

This is the contents of filename.csv (other rules omitted for brevity reasons)

layer,position.bottom,source,destination,service.1,service.2,service.3,action,track,comments

MY_POLICY_NAME Network,<my section name>,host_object,group_object,TCP111,TCP222,TCP333,Accept,Log,<my comments>

If I run the command manually below it works fine and adds the rule

mgmt_cli -s id.txt add access-rule "MY_POLICY_NAME Network" position.bottom "my section name" source "host_object" destination "group_object" service.1 "TCP111" service.2 "TCP222" service.3 "TCP333" action "Accept" track "Log" comments "my comments"

I thought it might be something to do with the format of the csv file so I ran the dos2unix command but got the same error message. 

If anyone has any ideas, let me know.  Thanks for reading. 

Nick

 

 

0 Kudos
4 Replies
PhoneBoy
Admin
Admin

There is no release R81.40.
API 1.8.1 suggests the real release is R81.10 + JHF. 
Recommend a TAC case: https://help.checkpoint.com 

0 Kudos
Chancer
Participant

Thanks.

That was a typo on my part. It should of been R81.10.  I will raise a TAC case.

BTW - I remember your excellent website back in the day. We always used it, it was a fantastic resource!

Cheers

Nick

 

 

 

 

0 Kudos
emmap
Employee
Employee

You've not specified an action in your second command there, you've just fed a bunch of parameters after a login prompt.

0 Kudos
Chancer
Participant

Good spot. Sorry I posted this in a rush and it was on a Monday morning which didn't help.  This is the command I'm entering

mgmt_cli login -s id.txt add access-rule -d  xxx.xxx.xxx.xxx --batch filename.csv

Cheers for replying

Thanks 

Nick

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events