- Products
- Learn
- Local User Groups
- Partners
-
More
Join Us for CPX 360
23-24 February 2021
Important certificate update to CloudGuard Controller, CME,
and Azure HA Security Gateways
How to Remediate Endpoint & VPN
Issues (in versions E81.10 or earlier)
IDC Spotlight -
Uplevel The SOC
Important! R80 and R80.10
End Of Support around the corner (May 2021)
Dear all,
I have created a Black List group and every week I am adding roughly between 20 up to 40(ish) new hosts...
I have read that there is a possibility to use mgmt_cli in order to create all of them in one shot....
I have created the csv file in a UTF-8 format and used sk113078 as a guideline...
name,ip-address
Black_List_408,104.248.164.231
Black_List_409,118.70.113.1
These are the top three rows of the csv file...
when trying to execute the file I get the following:
[Expert@management:0]# mgmt_cli add host --batch blacklist.csv
Username: ohadadmin
Password:
Failed to read parameters file [blacklist.csv]: Failed to open file.
I have no idea what I am doing wrong here... and the Management API Reference is less than useless... There isnt even 1 example of how it should be...
Can anyone please assist...?
Also if anyone could educate me on how to add those objects to the "Black_List" group that I created (Preferably with the same csv file) I would really appreciate it
Check the file is in the right directory and has at least read-only permissions for your API user
Hi Val,
Thanks for the quick reply 🙂
The file is in the right directory...
I also did a #cat Blacklist.csv and saw that the rows are as the mentioned SK should...
Furthermore I also gave the file full permissions #chmod +rwx
Correct, I believe the full path was a miss here
You store the file on the management server, ie in the /home/admin/ directory, tehn you use mgmt_cli add host --batch /home/admin/tarion.csv
However, the file you have posted is not going to be importable, you need these fields: name, ipv4-address
in your file I see lines that have an IP block as the first field, the name always has to start with a Character, not a number. but hosts require IP addresses and I do not see any on these lines.
Thanks Maarten. I consulted with Ottawa tac and guy saw what I was doing and confirmed process was definitely correct, but it looks like excel was inserting a character where it was not supposed to : ). What he did was create a new txt file and then either use that or convert it into .csv, but either one works.
Thanks again! I wish this was easy like back in R77 and before where you could simply copy and paste objects in dashboard...I do see there is an option now to export all the objects, but its sort of useless really if you can never import them.
Thank you for the response and be well!
Andy
About CheckMates
Learn Check Point
Advanced Learning
WELCOME TO THE FUTURE OF CYBER SECURITY