<?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: Question: &amp;quot;Ansible Module&amp;quot; for Checkpoint Managment server R80.10 in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27247#M129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The demos here create gateways with an Ansible playbook:&amp;nbsp;&lt;A href="https://community.checkpoint.com/docs/DOC-2173"&gt;CheckMates_Aug15_Demos.zip&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now that I think about it, the gateways here are actually being created (and SICed) using the CloudGuard/vSEC controller.&amp;nbsp;&lt;BR /&gt;However, as I pointed to in your other post, it should be possible to make the appropriate API calls to create the gateway.&lt;/P&gt;&lt;P&gt;Establishing the SIC is a different matter, but this can be done on the CLI of the management like so:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;push_cert –s Cust_CMA –u admin –p adminpw –o examplegw –k test123&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You can use the run-script API to call this from Ansible.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.checkpoint.com/message/13017"&gt;how to use the web api to run the run-script&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only thing you can do on the gateway as far as establishing management communication is using the initial SIC password.&lt;/P&gt;&lt;P&gt;When the gateway is created in the management and SIC is established, certificates are generated that are used for communication.&lt;/P&gt;&lt;P&gt;You can't really say "only accept a SIC connection from X host" beforehand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting the expert password is a clish command.&lt;/P&gt;&lt;P&gt;In your user_data script, you'd include a command like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;clish -c 'set expert-password-hash yourhash' -s&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;where yourhash is computed with openssl passwd -1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 Sep 2018 04:47:24 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2018-09-16T04:47:24Z</dc:date>
    <item>
      <title>Question: "Ansible Module" for Checkpoint Managment server R80.10</title>
      <link>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27246#M128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating an "Ansible&amp;nbsp;Module" for Checkpoint Managment server R80.10, I am looking for two solutions&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. How to add any Gateway in the Management server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. How to define an instance as the management server, and SIC key for gateways.I&amp;nbsp;know there is a solution is available by using mgmt_cli but in that commands run in expert mode and how I can configure first Expert mode password? I am using bash to define instance as a gateway,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my_user_data: |&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;clish -c 'set user admin shell /bin/bash' -s&lt;BR /&gt;clish -c 'set static-route {{ aws_lb1_subnet_cidr }} nexthop gateway address {{ aws_internal_route }} on' -s&lt;BR /&gt;config_system -s 'install_security_gw=true&amp;amp;install_ppak=true&amp;amp;gateway_cluster_member=false&amp;amp;install_security_managment=false&amp;amp;ftw_sic_key=vpn12345';shutdown -r now;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any Ansible module available for this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be highly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit Chaubey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2018 20:22:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27246#M128</guid>
      <dc:creator>Amit_Chaubey</dc:creator>
      <dc:date>2018-09-15T20:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Question: "Ansible Module" for Checkpoint Managment server R80.10</title>
      <link>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27247#M129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The demos here create gateways with an Ansible playbook:&amp;nbsp;&lt;A href="https://community.checkpoint.com/docs/DOC-2173"&gt;CheckMates_Aug15_Demos.zip&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now that I think about it, the gateways here are actually being created (and SICed) using the CloudGuard/vSEC controller.&amp;nbsp;&lt;BR /&gt;However, as I pointed to in your other post, it should be possible to make the appropriate API calls to create the gateway.&lt;/P&gt;&lt;P&gt;Establishing the SIC is a different matter, but this can be done on the CLI of the management like so:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;push_cert –s Cust_CMA –u admin –p adminpw –o examplegw –k test123&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You can use the run-script API to call this from Ansible.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.checkpoint.com/message/13017"&gt;how to use the web api to run the run-script&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only thing you can do on the gateway as far as establishing management communication is using the initial SIC password.&lt;/P&gt;&lt;P&gt;When the gateway is created in the management and SIC is established, certificates are generated that are used for communication.&lt;/P&gt;&lt;P&gt;You can't really say "only accept a SIC connection from X host" beforehand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting the expert password is a clish command.&lt;/P&gt;&lt;P&gt;In your user_data script, you'd include a command like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;clish -c 'set expert-password-hash yourhash' -s&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;where yourhash is computed with openssl passwd -1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Sep 2018 04:47:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27247#M129</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-09-16T04:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Question: "Ansible Module" for Checkpoint Managment server R80.10</title>
      <link>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27248#M130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dameon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for sharing the information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About adding getaway to the management server, I have tried below command and after supplied the username/password of the management server it worked. but I think it can't be used in my&amp;nbsp;user data file for the management server, right? if yes, then&amp;nbsp;is there any way to add this&amp;nbsp;task in user data&amp;nbsp;file?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mgmt_cli add simple-gateway name "gw1" color "yellow" ipv4 -address "192.0.2.230" version "R80" one-time-password "aaaa" firewall true vpn true application-control true url-filtering true ips true anti-bot true anti-vir us true threat-emulation true interfaces.1.name "eth0" interfaces.1.ipv4-address "192.0.2.230" interfaces.1.ipv4-network-mask "255.255.255.128" interfaces.1.ant i-spoofing true interfaces.1.topology "EXTERNAL" interfaces.2.name "eth1" interf aces.2.ipv4-address "192.0.2.88" interfaces.2.ipv4-network-mask "255.255.255.0" interfaces.2.anti-spoofing true interfaces.2.topology "INTERNAL" --version 1.1&lt;BR /&gt;Username: ****&lt;BR /&gt;Password:********&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also triedby usin&lt;A _jive_internal="true" class="" data-containerid="2003" data-containertype="14" data-objectid="2173" data-objecttype="102" href="https://community.checkpoint.com/docs/DOC-2173" style="color: #e45785; background-color: #ffffff; border: 0px; padding: 1px 0px 1px calc(12px + 0.35ex);"&gt;CheckMates_Aug15_Demos.zip&lt;/A&gt;&lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;, and tried using available&amp;nbsp;ansible playbook(R80_CreateGateway.yml) to accomplished this, and end up with below error,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLAY [localhost] ****************************************************************************************************************************************************************&lt;/P&gt;&lt;P&gt;TASK [Wait up to 300 seconds for SIC port 18211 to Open] ************************************************************************************************************************&lt;BR /&gt;skipping: [localhost]&lt;/P&gt;&lt;P&gt;TASK [login] ********************************************************************************************************************************************************************&lt;BR /&gt;ok: [localhost]&lt;/P&gt;&lt;P&gt;TASK [Create SimpleGateway GW01 at 10.107.240.76] *******************************************************************************************************************************&lt;BR /&gt;fatal: [localhost]: FAILED! =&amp;gt; {"changed": false, "msg": "Command 'add-simple-gateway {u'one-time-password': u'vpn12345', u'name': u'GW01', u'color': u'blue', u'interfaces': [{u'ipv4-network-mask': u'255.255.255.0', u'anti-spoofing': u'true', u'ipv4-address': u'10.107.240.76', u'name': u'eth0', u'topology': u'External'}], u'ips': u'true', u'version': u'R80.10', u'ipv4-address': u'10.107.240.76', u'firewall': u'true'}' failed with error message: APIResponse received a response which is not a valid JSON.. All changes are discarded and the session is invalidated."}&lt;BR /&gt;[WARNING]: Could not create retry file '/etc/ansible/cpAnsible/Playbooks/CreateGateway.retry'. [Errno 13] Permission denied:&lt;BR /&gt;u'/etc/ansible/cpAnsible/Playbooks/CreateGateway.retry'&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PLAY RECAP **********************************************************************************************************************************************************************&lt;BR /&gt;localhost : ok=1 changed=0 unreachable=0 failed=1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2018 09:31:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27248#M130</guid>
      <dc:creator>Amit_Chaubey</dc:creator>
      <dc:date>2018-09-18T09:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Question: "Ansible Module" for Checkpoint Managment server R80.10</title>
      <link>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27249#M131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're using the command on the CLI and logged into the Security Management server, you can simply add an -r true to the comamnd and then you don't need credentials &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.checkpoint.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;Also, after creating the gateway, don't forget to publish the session as the gateway (or any other&amp;nbsp;changes) won't show up unless you do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As to why the playbook isn't creating a gateway... &lt;A href="https://community.checkpoint.com/migrated-users/45404"&gt;Ryan Darst&lt;/A&gt;‌ any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2018 13:20:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27249#M131</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-09-18T13:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Question: "Ansible Module" for Checkpoint Managment server R80.10</title>
      <link>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27250#M132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Was the gateway up and running when the add-gateway command was run?&amp;nbsp; I see that the wait for the SIC port was canceled/skipped.&amp;nbsp; This check is used to verify that the gateway is up and running, reachable and listening on port 18211.&amp;nbsp; Once this is verified the api call can be made to add the gateway via the API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To see the error that the API sent, look on the R80 Management server in $FWDIR/log/api.elg and look for this transaction and see what the error shows and it should point you in the right direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2018 13:29:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Question-quot-Ansible-Module-quot-for-Checkpoint-Managment/m-p/27250#M132</guid>
      <dc:creator>Ryan_Darst</dc:creator>
      <dc:date>2018-09-18T13:29:05Z</dc:date>
    </item>
  </channel>
</rss>

