<?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: How to found out Policy Package from R77.30 CLI in General Topics</title>
    <link>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36345#M7657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably the easiest way is to query the gateway directly and ask what policy package is already installed, either with fw stat or cpstat -f policy fw.&lt;/P&gt;&lt;P&gt;Then install that one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, I'm not sure how you'd achieve that with dbedit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 Mar 2018 20:23:02 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2018-03-18T20:23:02Z</dc:date>
    <item>
      <title>How to found out Policy Package from R77.30 CLI</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36344#M7656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently working on small script which will install Policy from R77.30 management on given Gateway.&lt;/P&gt;&lt;P&gt;We are using many Gateways and each one has unique policy package, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; width: 41.8546%;"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef; height: 25px;"&gt;&lt;TH style="height: 25px; width: 16%;"&gt;Gateway Name&lt;/TH&gt;&lt;TH style="height: 25px; width: 21.9072%;"&gt;Policy Package Name&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR style="height: 25px;"&gt;&lt;TD style="height: 25px; width: 16%;"&gt;Apple&lt;/TD&gt;&lt;TD style="height: 25px; width: 21.9072%;"&gt;Fruit&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 25px;"&gt;&lt;TD style="height: 25px; width: 16%;"&gt;Cucumber&lt;/TD&gt;&lt;TD style="height: 25px; width: 21.9072%;"&gt;Vegetables&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 25px;"&gt;&lt;TD style="height: 25px; width: 16%;"&gt;Car&lt;/TD&gt;&lt;TD style="height: 25px; width: 21.9072%;"&gt;Vehicle&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that installation is possible from Management CLI using following syntax:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;fwm load &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Policy Package Name&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Gateway Name&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But is there easy way how to find out corresponding Policy Package Name of given Gateway ? Via CLI or dbedit ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please be aware that I want to use it within &lt;EM&gt;&lt;STRONG&gt;R77.30&lt;/STRONG&gt;&lt;/EM&gt;, not for R80.10 management (as in R80.10 this is easy to archive via API)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My idea is to just specify Gateway Name and the Policy Package will be automatically checked and used in fwm load command as first parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;./Install_Policy.sh Apple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the output of this script will be:&lt;/P&gt;&lt;P&gt;fwm load Fruit Apple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If someone has good idea how to deal with this situation, please, let me know &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;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2018 17:15:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36344#M7656</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2018-03-18T17:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to found out Policy Package from R77.30 CLI</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36345#M7657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably the easiest way is to query the gateway directly and ask what policy package is already installed, either with fw stat or cpstat -f policy fw.&lt;/P&gt;&lt;P&gt;Then install that one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, I'm not sure how you'd achieve that with dbedit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2018 20:23:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36345#M7657</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-03-18T20:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to found out Policy Package from R77.30 CLI</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36346#M7658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can get all policies and targets with &lt;STRONG&gt;dbedit /&amp;nbsp;printxml policies_collections&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't give you more than that as it depends if you run MDS or regular mgmt and if you have multiple targets per policy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But XML output looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&amp;lt;policies_collections_object&amp;gt;&lt;SPAN style="color: #339966;"&gt;&lt;STRONG&gt;vs-example-rulebase&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;lt;all_internal_modules&amp;gt;false&amp;lt;/all_internal_modules&amp;gt;&lt;BR /&gt;&amp;lt;color&amp;gt;&amp;lt;![CDATA[black]]&amp;gt;&amp;lt;/color&amp;gt;&lt;BR /&gt;&amp;lt;comments&amp;gt;&amp;lt;![CDATA[]]&amp;gt;&amp;lt;/comments&amp;gt;&lt;BR /&gt;&amp;lt;default&amp;gt;0&amp;lt;/default&amp;gt;&lt;BR /&gt;&amp;lt;installable_targets&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;unnamed_element setname=""&amp;gt;ReferenceObject&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;&lt;SPAN style="color: #339966;"&gt;&lt;STRONG&gt;vs-example&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;lt;/Name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Table&amp;gt;network_objects&amp;lt;/Table&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Uid&amp;gt;{939CA8AC-8D77-4540-B7E7-93F06C86AC99}&amp;lt;/Uid&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/unnamed_element&amp;gt;&lt;BR /&gt;&amp;lt;/installable_targets&amp;gt;&lt;BR /&gt;&amp;lt;type&amp;gt;&amp;lt;![CDATA[policies_collection]]&amp;gt;&amp;lt;/type&amp;gt;&lt;BR /&gt;&amp;lt;/policies_collections_object&amp;gt;‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 08:57:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36346#M7658</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2018-03-19T08:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to found out Policy Package from R77.30 CLI</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36347#M7659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And from GuiDBedit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/63941_pastedImage_1.png" style="width: 620px; height: 204px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 08:59:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36347#M7659</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2018-03-19T08:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to found out Policy Package from R77.30 CLI</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36348#M7660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If XML is not your best friend, then maybe the following is useful. In this example there are 2 policy packages and 2 gateways and a query in the management server displays which gateways are installable targets of each policy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;cpmiquerybin attr "" policies_collections "" -a __name__,installable_targets&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;SamplePolicyPackage01 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name: testfwobj01 (Table: network_objects)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 13px;"&gt;Standard&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name: testfwobj02 (Table: network_objects)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 12:17:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36348#M7660</guid>
      <dc:creator>Olavi_Lentso</dc:creator>
      <dc:date>2018-03-19T12:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to found out Policy Package from R77.30 CLI</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36349#M7661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Olavi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is exactly what I searched for !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 21:01:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36349#M7661</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2018-03-19T21:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to found out Policy Package from R77.30 CLI</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36350#M7662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Found 2 options:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 12px;"&gt;cpmiquerybin attr "" policies_collections "" -a installable_targets,__name__ | grep &amp;lt;CLUSTER_NAME&amp;gt;&amp;nbsp;| awk '{print $5}'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;echo -e "query policies_collections, type='policies_collection'\nquit" | dbedit -local | grep &amp;lt;CLUSTER_NAME&amp;gt; -B 13 | head -n 1 | awk '{print $3}'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Mar 2018 18:05:19 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-found-out-Policy-Package-from-R77-30-CLI/m-p/36350#M7662</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2018-03-24T18:05:19Z</dc:date>
    </item>
  </channel>
</rss>

