Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mkol5222/cb1587dd6f89e3a734848c890d3f5517 to your computer and use it in GitHub Desktop.
Save mkol5222/cb1587dd6f89e3a734848c890d3f5517 to your computer and use it in GitHub Desktop.
Azure Custom-Data - Check Point Management - Basic Autoreg Setup
#!/bin/bash
GUI_USER="admin"
GUI_PASS="vpn123"
API_USER="api_user"
API_PASS="vpn123"
config_system -s "install_security_gw=false&install_ppak=false&gateway_cluster_member=false&install_security_managment=true&install_mgmt_primary=true&install mgmt_secondary=false&mgmt_admin_name=$GUI_USER&mgmt_admin_passwd=$GUI_PASS&mgmt_gui_clients_radio=any"
while true;
do
API_STATUS=$(api status | grep "Overall API Status" | cut -d ':' -f 2)
if [ "$API_STATUS" == " Started" ]; then break; else sleep 10s; fi
done
mgmt_cli -r true set access-rule name "Cleanup Rule" layer "Network" action "Accept" track "Log" --format json
mgmt_cli -r true add administrator name "$API_USER" password "$API_PASS" must-change-password false email "[email protected]" phone-number "1800-800-800" authentication-method "INTERNAL_PASSWORD" permissions-profile "read write all" --domain 'System Data' --format json
mgmt_cli -r true set api-settings accepted-api-calls-from "All IP addresses" --domain 'System Data' --format json
api restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment