Forked from joe-at-cp/gist:ec810eedc7e059605575ce9e03ee8881
Created
June 6, 2025 18:38
-
-
Save mkol5222/cb1587dd6f89e3a734848c890d3f5517 to your computer and use it in GitHub Desktop.
Azure Custom-Data - Check Point Management - Basic Autoreg Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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