<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Automating the First-Time Configuration Wizard in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automating-the-First-Time-Configuration-Wizard/m-p/179698#M32922</link>
    <description>&lt;P&gt;Hey Val, I posted it here temporarily while Dameon approves and moves it to the whitepaper repository. But yes, the goal is to make it publicly available!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 14:34:55 GMT</pubDate>
    <dc:creator>crescentwire</dc:creator>
    <dc:date>2023-05-02T14:34:55Z</dc:date>
    <item>
      <title>Automating the First-Time Configuration Wizard</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automating-the-First-Time-Configuration-Wizard/m-p/179689#M32920</link>
      <description>&lt;P&gt;Written by&amp;nbsp;Michael Ibarra, Security Engineer, Mid-Atlantic Region&lt;/P&gt;
&lt;P&gt;November 10, 2022&lt;/P&gt;
&lt;H1&gt;Overview&lt;/H1&gt;
&lt;P&gt;Deploying a new Check Point appliance requires completing the First-Time Configuration Wizard (FTW). This GUI-driven set of steps prepares the appliance for further configuration using CLISH or the web-based UI and is a mandatory part of deploying any new appliance.&lt;/P&gt;
&lt;P&gt;Ideally, the FTW would be run after the appliance has booted after installation from an ISO, connected to a network and ready for all subsequent configuration. But this is not always possible. For instance, there may be times when an appliance must be fully configured &lt;EM&gt;without&lt;/EM&gt; an active network connection, web browser session, or other means of loading a responsive web GUI. For instance, in an untrusted or highly sensitive environment, deploying an NDR sensor with only serial console access is advantageous. But, without a web UI session available, completing the FTW is not possible.&lt;/P&gt;
&lt;P&gt;The FTW-CLI tool solves this challenge by generating the necessary "answer file" the FTW needs to complete the configuration. This is done through a simple BASH script, prompting the user for input, and storing the values in a separate file. An embedded script, &lt;FONT face="courier new,courier"&gt;config-system&lt;/FONT&gt;, uses this file to complete the FTW steps, readying the system for remaining configuration and production-use.&lt;/P&gt;
&lt;H1&gt;Usage&lt;/H1&gt;
&lt;P&gt;Begin by downloading the latest version of the &lt;FONT face="courier new,courier"&gt;ftw-cli&lt;/FONT&gt; &lt;A href="https://github.com/crescentwire/ftw-cli" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. Other resources and references are available under the section at the end of this guide.&lt;/P&gt;
&lt;P&gt;Follow these steps to use the tool:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Install GAIA using &lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk65205" target="_blank" rel="noopener"&gt;ISOmorphic&lt;/A&gt; or a bootable ISO on your physical or virtual hardware.&lt;/LI&gt;
&lt;LI&gt;Connect via SSH or serial console to the system.&lt;/LI&gt;
&lt;LI&gt;Download and extract the contents of the latest release of the &lt;FONT face="courier new,courier"&gt;ftw-cli&lt;/FONT&gt; tool.&lt;/LI&gt;
&lt;LI&gt;Either (1) copy the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;ftw_cli_run.sh&lt;/FONT&gt;&amp;nbsp;file to&amp;nbsp;&lt;FONT face="courier new,courier"&gt;/home/admin&lt;/FONT&gt;&amp;nbsp;via SFTP, or (2) use&amp;nbsp;&lt;FONT face="courier new,courier"&gt;vi&lt;/FONT&gt;&amp;nbsp;to create a new, empty file and paste the contents of&amp;nbsp;&lt;FONT face="courier new,courier"&gt;ftw_cli_run.sh&lt;/FONT&gt;&amp;nbsp;inside. Then, save using&amp;nbsp;&lt;FONT face="courier new,courier"&gt;:wq!&lt;/FONT&gt;.&lt;/LI&gt;
&lt;LI&gt;Navigate to the directory where you saved &lt;FONT face="courier new,courier"&gt;ftw_cli_run.sh&lt;/FONT&gt;.&lt;/LI&gt;
&lt;LI&gt;Run&amp;nbsp;&lt;FONT face="courier new,courier"&gt;chmod +x ftw_cli_run.sh&lt;/FONT&gt;&amp;nbsp;to make the script executable.&lt;/LI&gt;
&lt;LI&gt;Run the script using&amp;nbsp;&lt;FONT face="courier new,courier"&gt;./ftw_cli_run.sh&lt;/FONT&gt;.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;ftw-cli&lt;/FONT&gt; tool consists of two sections: general system and platform-specific configuration. These sections are separated by a prompt:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Are you installing Management, Security Gateway, Standalone (Combined), or MDS?

(1) Management
(2) Security Gateway
(3) Standalone
(4) MDS

Enter 1-4: 
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reaching this question denotes you've arrived at a series of if/then steps that ultimately determine whether you will end up with a management server, gateway, or MDS appliance.&lt;/P&gt;
&lt;P&gt;After you've reached the end of the platform-specific configuration, an answer file with the syntax &lt;FONT face="courier new,courier"&gt;ftw_config_[date-created]-[time-created]&lt;/FONT&gt; will exist in the same directory as &lt;FONT face="courier new,courier"&gt;ftw_cli_run.sh&lt;/FONT&gt;. An example of this file's contents is below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Expert@gw-3bdcf5:0]# cat ftw_config_20221110-111246 
ipstat_v4=manually
ipstat_v6=off
hostname=ih-gw01
domainname=ibarralabs.com
primary=10.5.1.10
secondary=1.1.1.1
tertiary=1.0.0.1
ntp_primary_version=4
ntp_secondary_version=4
ntp_primary=ntp.checkpoint.com
ntp_primary=ntp2.checkpoint.com
timezone='America/New_York'
install_security_gw=true
gateway_daip=false
ftw_sic_key=p@55w0rd
download_info=true
upload_info=true
upload_crash_data=true
reboot_if_required=true&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Example Configuration - Security Gateway (SMS-Managed, Non-ClusterXL)&lt;/H1&gt;
&lt;OL&gt;
&lt;LI&gt;Proceed through the general system configuration steps (see below as an example).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Expert@gw-3bdcf5:0]# ./ftw_cli_run.sh 

Welcome to the FTW CLI script!

Change current management interface (eth0)? Enter y/n: n

Configure IPv4 for management interface? Enter y/n: y

Change current IP address (10.5.1.101/24) for eth0? Enter y/n: n

Configure IPv6 for management interface? Enter y/n: n

Enter hostname: ih-gw01
Enter domain name: ibarralabs.com

Enter primary DNS server: 10.5.1.10
Enter secondary DNS server (Enter to skip): 1.1.1.1
Enter tertiary DNS server (Enter to skip): 1.0.0.1

Use a proxy server? Enter y/n: n

Configure NTP? Enter y/n: y

Change current NTP version (4)? Enter y/n: n

Change Check Point default NTP servers? Enter y/n: n

Enter timezone (in tz database format, e.g., America/Los_Angeles): America/New_York&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;Proceed through the platform-specific configuration steps (see below as an example).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Are you installing Management, Security Gateway, Standalone (Combined), or MDS?

(1) Management
(2) Security Gateway
(3) Standalone
(4) MDS

Enter 1-4: 2

Proceeding with Security Gateway install...

Is this a single gateway or cluster member?

(1) Single Gateway
(2) Cluster Member

Enter 1-2: 1

Single Gateway selected

Using a dynamically-assigned IP (DAIP) (default is no)? Enter y/n: n
Change admin password entered during install? Enter y/n: n

Enter SIC key: 
Enter SIC key again: 

Would you like to connect this device to Smart-1 Cloud (auth token required)? Enter y/n: n

Change defaults for communicating with User Center? Enter y/n: y

Download info from User Center? Enter y/n: y
Upload info to User Center? Enter y/n: y
Upload crash data (which may contain PII)? Enter y/n: y
Should the device reboot (if required) when config is complete? Enter y/n: y
That's it! Checking generated config values...

dos2unix: converting file ftw_config_20221110-111246 to Unix format ...

Config validated successfully!

Proceed with applying config? Enter y/n:&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="3"&gt;
&lt;LI&gt;Upon entering &lt;FONT face="courier new,courier"&gt;y&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;config-system&lt;/FONT&gt; will proceed to apply the configuration written to the answer file and, if necessary, reboot the system. Entering&amp;nbsp;&lt;FONT face="courier new,courier"&gt;n&lt;/FONT&gt; will cancel the operation but will provide a command to manually apply the config, should you choose to proceed (see example below).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Proceed with applying config? Enter y/n: n

Config apply canceled.

To run manually, issue this command from Expert mode:

config_system -f ftw_config_20221110-111246
[Expert@gw-3bdcf5:0]#&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="4"&gt;
&lt;LI&gt;After the appliance has finished rebooting, the appliance will be ready for remaining configuration and production-use.&lt;/LI&gt;
&lt;/OL&gt;
&lt;H1&gt;Example Configuration - Secure Management Server (Logging Only, Secondary)&lt;/H1&gt;
&lt;OL&gt;
&lt;LI&gt;Begin by proceeding through the general system configuration steps (reference example scenario above).&lt;/LI&gt;
&lt;LI&gt;Proceed through the platform-specific configuration steps (see below as an example).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Are you installing Management, Security Gateway, Standalone (Combined), or MDS?

(1) Management
(2) Security Gateway
(3) Standalone
(4) MDS

Enter 1-4: 1

Proceeding with Management install...

Is this a Primary, Secondary, or Dedicated/Separate SmartEvent or Logging server?

(1) Primary
(2) Secondary
(3) Dedicated SmartEvent/Logging

Enter 1-3: 3

Dedicated SmartEvent/Logging selected

Change GAIA default "admin" username? Enter y/n: n

Change default web UI access (permits any source)? Enter y/n: n

Enter SIC key: 
Enter SIC key again: 

Change defaults for communicating with User Center? Enter y/n: y

Download info from User Center? Enter y/n: y
Upload info to User Center? Enter y/n: y
Upload crash data (which may contain PII)? Enter y/n: y
Should the device reboot (if required) when config is complete? Enter y/n: y
That's it! Checking generated config values...

dos2unix: converting file ftw_config_20221110-112558 to Unix format ...

Config validated successfully!

Proceed with applying config? Enter y/n:&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Example Configuration - Multi-Domain Server (Primary)&lt;/H1&gt;
&lt;OL&gt;
&lt;LI&gt;Begin by proceeding through the general system configuration steps (reference example scenario above).&lt;/LI&gt;
&lt;LI&gt;Proceed through the platform-specific configuration steps (see below as an example).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Are you installing Management, Security Gateway, Standalone (Combined), or MDS?

(1) Management
(2) Security Gateway
(3) Standalone
(4) MDS

Enter 1-4: 4 

Proceeding with MDS install...

Is this a Primary, Secondary, or Dedicated/Separate Logging server?

(1) Primary
(2) Secondary
(3) Dedicated Logging

Enter 1-3: 1

Primary selected

Change GAIA default "admin" username? Enter y/n: n

Please define the MDS Leading VIP interface. Options are below: 

(0) eth0
(1) eth1
(2) lo

Enter desired interface (0-2): 0

Change default web UI access (permits any source)? Enter y/n: n

Change defaults for communicating with User Center? Enter y/n: y

Download info from User Center? Enter y/n: y
Upload info to User Center? Enter y/n: y
Upload crash data (which may contain PII)? Enter y/n: y
Should the device reboot (if required) when config is complete? Enter y/n: y
That's it! Checking generated config values...

dos2unix: converting file ftw_config_20221110-122230 to Unix format ...

Config validated successfully!

Proceed with applying config? Enter y/n:&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Summary&lt;/H1&gt;
&lt;P&gt;Through utilizing a simple BASH script--and not requiring any in-depth programming or scripting skills--we can sidestep the requirement of needing a web browser session to complete the setup of a newly deployed Check Point appliance--whether bare metal, virtualized, or in the cloud.&lt;/P&gt;
&lt;P&gt;Further, because BASH is natively supported on nearly every Linux distribution, cross-platform compatibility and extensibility using other tools (Python, Ansible, etc.) make this a foundational approach to any new deployment.&lt;/P&gt;
&lt;H1&gt;Troubleshooting&lt;/H1&gt;
&lt;P&gt;&lt;STRONG&gt;My config fails validation! What should I do?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This shouldn't happen, but I wrote this script accounting for only the QA scenarios I could think of. It's possible something has slipped through.&lt;/P&gt;
&lt;P&gt;Check your answer file's contents using cat from Expert mode and compare the values present with those listed in &lt;A href="https://sc1.checkpoint.com/documents/R81/WebAdminGuides/EN/CP_R81_Gaia_AdminGuide/Topics-GAG/Running-FTCW-in-CLI-Expert-Mode.htm#:~:text=Table%3A%20The%20%27config_system%27%20parameters" target="_blank" rel="noopener"&gt;this table&lt;/A&gt;. Re-run validation using the command &lt;FONT face="courier new,courier"&gt;config_system --dry-run -f ftw_config_[date-created]-[time-created]&lt;/FONT&gt; and take note of the errors listed.&lt;/P&gt;
&lt;P&gt;If all else fails, please create a new issue &lt;A href="https://github.com/crescentwire/ftw-cli/issues" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. I (and other users) will thank you for it!&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Some parts of my config applied, but others didn't. What's going on?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This can happen if the validation script either ignores or otherwise misses an entry you made. Other field types aren't explicitly checked for validity, like IP address syntax (four octets separated by decimals, or values &amp;gt;255) or &lt;FONT face="courier new,courier"&gt;tz&lt;/FONT&gt; database values. These are up to you to confirm, so check them twice before hitting Enter during the wizard (though you can always modify the answer file and manually run it with &lt;FONT face="courier new,courier"&gt;config_system&lt;/FONT&gt;).&lt;/P&gt;
&lt;P&gt;Check your answer file's contents using &lt;FONT face="courier new,courier"&gt;cat&lt;/FONT&gt; from Expert mode and compare the values present with those listed in &lt;A href="https://sc1.checkpoint.com/documents/R81/WebAdminGuides/EN/CP_R81_Gaia_AdminGuide/Topics-GAG/Running-FTCW-in-CLI-Expert-Mode.htm#:~:text=Table%3A%20The%20%27config_system%27%20parameters" target="_blank" rel="noopener"&gt;this table&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;This script doesn't cover a platform config scenario I need. How do I submit a feature request?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Please create a new issue &lt;A href="https://github.com/crescentwire/ftw-cli/issues" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. I'll do my best to add it to the script as I have time!&lt;/P&gt;
&lt;H1&gt;Reference&lt;/H1&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk71000" target="_blank" rel="noopener"&gt;sk71000&lt;/A&gt;&amp;nbsp;- Overview of the First-Time Configuration Wizard&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk69701" target="_blank" rel="noopener"&gt;sk69701&lt;/A&gt;&amp;nbsp;- Overview of using&amp;nbsp;config_system&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://sc1.checkpoint.com/documents/R81/WebAdminGuides/EN/CP_R81_Gaia_AdminGuide/Topics-GAG/Running-FTCW-in-CLI-Expert-Mode.htm" target="_blank" rel="noopener"&gt;GAIA R81 Administration Guide&lt;/A&gt;&amp;nbsp;- Detailed use of&amp;nbsp;config_system&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 02 May 2023 13:56:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automating-the-First-Time-Configuration-Wizard/m-p/179689#M32920</guid>
      <dc:creator>crescentwire</dc:creator>
      <dc:date>2023-05-02T13:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Automating the First-Time Configuration Wizard</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automating-the-First-Time-Configuration-Wizard/m-p/179695#M32921</link>
      <description>&lt;P&gt;Hi, great article, but why is it in the employees only space? Any reason NOT to share it with the customers?&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 14:17:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automating-the-First-Time-Configuration-Wizard/m-p/179695#M32921</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2023-05-02T14:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Automating the First-Time Configuration Wizard</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automating-the-First-Time-Configuration-Wizard/m-p/179698#M32922</link>
      <description>&lt;P&gt;Hey Val, I posted it here temporarily while Dameon approves and moves it to the whitepaper repository. But yes, the goal is to make it publicly available!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 14:34:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automating-the-First-Time-Configuration-Wizard/m-p/179698#M32922</guid>
      <dc:creator>crescentwire</dc:creator>
      <dc:date>2023-05-02T14:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Automating the First-Time Configuration Wizard</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automating-the-First-Time-Configuration-Wizard/m-p/179700#M32923</link>
      <description>&lt;P&gt;"Four eyes" review &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 14:38:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Automating-the-First-Time-Configuration-Wizard/m-p/179700#M32923</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-05-02T14:38:47Z</dc:date>
    </item>
  </channel>
</rss>

