<?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 how to create access rule ansible in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/how-to-create-access-rule-ansible/m-p/22986#M140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;im trying to build a ansible playbook to create a new rule with new network,new tcp-serivces ports 3030 and 3131 443 to existing default policy to a specific destination network group.&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: "localhost"&lt;BR /&gt; tasks:&lt;BR /&gt; - name: "login"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: login&lt;BR /&gt; parameters:&lt;BR /&gt; username: "{{mgmt_user}}"&lt;BR /&gt; password: "{{mgmt_password}}"&lt;BR /&gt; management: "{{mgmt_server}}"&lt;BR /&gt; fingerprint: "E2:B7:XX:XX:XX:XX:XXXX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:1B:XX"&lt;BR /&gt; register: login_response&lt;/P&gt;&lt;P&gt;- name: "ADD-DEMO-NET-GROUP"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: add-group&lt;BR /&gt; parameters:&lt;BR /&gt; name: "DEMO-NETS"&lt;BR /&gt; session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "ADD-DEMOT-NET-&lt;SPAN&gt;103.119.75.0&lt;/SPAN&gt;" &lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: add-network&lt;BR /&gt; parameters:&lt;BR /&gt; name: "DEMO-TEST"&lt;BR /&gt; subnet: "103.119.75.0"&lt;BR /&gt; subnet-mask: "255.255.255.0" &lt;BR /&gt; groups: "DEMO-NETS"&lt;BR /&gt; session-data: "{{login_response}}&lt;/P&gt;&lt;P&gt;- name: "add access section&amp;nbsp;new rules"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: add-access-section&lt;BR /&gt; parameters:&lt;BR /&gt; layer: "Network"&lt;BR /&gt; name: "Newrules"&lt;BR /&gt; position: "top"&lt;BR /&gt; session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "add access rule from&amp;nbsp;DEMO-TEST networks to any"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: add-access-rule&lt;BR /&gt; parameters:&lt;BR /&gt; layer: "Network"&lt;BR /&gt; name: "created by ansible playbook"&lt;BR /&gt; position:&lt;BR /&gt; top: "Newrules"&lt;BR /&gt; source:&lt;BR /&gt; - "DEMO-NETS"&lt;BR /&gt; destination:&lt;BR /&gt; - "any"&lt;BR /&gt; &lt;STRONG&gt;service:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; - "any"&lt;/STRONG&gt;&lt;BR /&gt; action: "accept"&lt;BR /&gt; track: "log"&lt;BR /&gt; session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "publish"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: publish&lt;BR /&gt; session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "logout"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: logout &lt;BR /&gt; session-data: "{{login_response}}"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jan 2019 17:33:33 GMT</pubDate>
    <dc:creator>amdan_bin_abdul</dc:creator>
    <dc:date>2019-01-09T17:33:33Z</dc:date>
    <item>
      <title>how to create access rule ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/how-to-create-access-rule-ansible/m-p/22986#M140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;im trying to build a ansible playbook to create a new rule with new network,new tcp-serivces ports 3030 and 3131 443 to existing default policy to a specific destination network group.&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;- hosts: "localhost"&lt;BR /&gt; tasks:&lt;BR /&gt; - name: "login"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: login&lt;BR /&gt; parameters:&lt;BR /&gt; username: "{{mgmt_user}}"&lt;BR /&gt; password: "{{mgmt_password}}"&lt;BR /&gt; management: "{{mgmt_server}}"&lt;BR /&gt; fingerprint: "E2:B7:XX:XX:XX:XX:XXXX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:1B:XX"&lt;BR /&gt; register: login_response&lt;/P&gt;&lt;P&gt;- name: "ADD-DEMO-NET-GROUP"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: add-group&lt;BR /&gt; parameters:&lt;BR /&gt; name: "DEMO-NETS"&lt;BR /&gt; session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "ADD-DEMOT-NET-&lt;SPAN&gt;103.119.75.0&lt;/SPAN&gt;" &lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: add-network&lt;BR /&gt; parameters:&lt;BR /&gt; name: "DEMO-TEST"&lt;BR /&gt; subnet: "103.119.75.0"&lt;BR /&gt; subnet-mask: "255.255.255.0" &lt;BR /&gt; groups: "DEMO-NETS"&lt;BR /&gt; session-data: "{{login_response}}&lt;/P&gt;&lt;P&gt;- name: "add access section&amp;nbsp;new rules"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: add-access-section&lt;BR /&gt; parameters:&lt;BR /&gt; layer: "Network"&lt;BR /&gt; name: "Newrules"&lt;BR /&gt; position: "top"&lt;BR /&gt; session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "add access rule from&amp;nbsp;DEMO-TEST networks to any"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: add-access-rule&lt;BR /&gt; parameters:&lt;BR /&gt; layer: "Network"&lt;BR /&gt; name: "created by ansible playbook"&lt;BR /&gt; position:&lt;BR /&gt; top: "Newrules"&lt;BR /&gt; source:&lt;BR /&gt; - "DEMO-NETS"&lt;BR /&gt; destination:&lt;BR /&gt; - "any"&lt;BR /&gt; &lt;STRONG&gt;service:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; - "any"&lt;/STRONG&gt;&lt;BR /&gt; action: "accept"&lt;BR /&gt; track: "log"&lt;BR /&gt; session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "publish"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: publish&lt;BR /&gt; session-data: "{{login_response}}"&lt;/P&gt;&lt;P&gt;- name: "logout"&lt;BR /&gt; check_point_mgmt:&lt;BR /&gt; command: logout &lt;BR /&gt; session-data: "{{login_response}}"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 17:33:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/how-to-create-access-rule-ansible/m-p/22986#M140</guid>
      <dc:creator>amdan_bin_abdul</dc:creator>
      <dc:date>2019-01-09T17:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to create access rule ansible</title>
      <link>https://community.checkpoint.com/t5/Ansible/how-to-create-access-rule-ansible/m-p/22987#M141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At a high level you would have to create the relevant TCP services 3030 and 3031.&lt;/P&gt;&lt;P&gt;There is already a service for port 443 called https.&lt;/P&gt;&lt;P&gt;Either add said services directly to the rule or create a group of services and add that group.&lt;/P&gt;&lt;P&gt;Basic API documentation:&amp;nbsp;&lt;A class="link-titled" href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#introduction~v1.4" title="https://sc1.checkpoint.com/documents/latest/APIs/index.html#introduction~v1.4"&gt;Check Point - Management API reference&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2019 04:19:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/how-to-create-access-rule-ansible/m-p/22987#M141</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2019-01-11T04:19:03Z</dc:date>
    </item>
  </channel>
</rss>

