<?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: Change cloning group features with a script in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132513#M19642</link>
    <description>&lt;P&gt;clish -c runs a single command and exits afterwords.&lt;BR /&gt;Which means the way you're doing this won't work.&lt;BR /&gt;You need to put the relevant commands in a script and run clish against that script instead.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Oct 2021 01:40:22 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2021-10-25T01:40:22Z</dc:date>
    <item>
      <title>Change cloning group features with a script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132444#M19620</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please could you help, I don't know how to change a cloning group feature from the Multidomain server ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i do the following :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;$CPDIR/bin/cprid_util -server &amp;lt;IP_address_of_Security_Gateway&amp;gt; -verbose rexec -rcmd /bin/clish -s -c 'set config-lock on override'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;$CPDIR/bin/cprid_util -server &amp;lt;IP_address_of_Security_Gateway&amp;gt; -verbose rexec -rcmd /bin/clish -s -c 'set 'cloning-group-management on'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;$CPDIR/bin/cprid_util -server &amp;lt;IP_address_of_Security_Gateway&amp;gt; -verbose rexec -rcmd /bin/clish -s -c 'delete allowed-client host ipv4-address x.X.X.X'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have this error :&amp;nbsp; This Command is only available in Cloning Group Mode, please login as cadmin in order to use it&lt;/P&gt;&lt;P&gt;It seems the 'set cloning-group-management on' run before doesn't work.&lt;/P&gt;&lt;P&gt;Do you please have any advice on how to work around this problem ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 16:00:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132444#M19620</guid>
      <dc:creator>oconnork</dc:creator>
      <dc:date>2021-10-22T16:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Change cloning group features with a script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132513#M19642</link>
      <description>&lt;P&gt;clish -c runs a single command and exits afterwords.&lt;BR /&gt;Which means the way you're doing this won't work.&lt;BR /&gt;You need to put the relevant commands in a script and run clish against that script instead.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 01:40:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132513#M19642</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-10-25T01:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Change cloning group features with a script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132527#M19646</link>
      <description>&lt;P&gt;Well actually this commands is already within a script and usually it works well as long as I don't need to be in a specific mode like the cloning group mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please advise how I could make multiples commands in one session ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have read about the command start transaction/commit. I will try this way and let you know the results.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 07:20:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132527#M19646</guid>
      <dc:creator>oconnork</dc:creator>
      <dc:date>2021-10-25T07:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Change cloning group features with a script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132528#M19647</link>
      <description>&lt;P&gt;Instead of making three separate calls to clish as you are doing now, which literally creates three separate sessions, you will make a single call.&lt;BR /&gt;That single call will be something like: clish -f scriptfile&lt;BR /&gt;The script file will contain all the necessary commands and will be run in a single session.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 07:26:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132528#M19647</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-10-25T07:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Change cloning group features with a script</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132617#M19667</link>
      <description>&lt;P&gt;Many thanks&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/7"&gt;@PhoneBoy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution was to create a script from mds to the firewall, Run the remote script and remove the script&lt;/P&gt;&lt;P&gt;I used the following commands for that :&amp;nbsp;&lt;/P&gt;&lt;P&gt;mgmt_cli put-file file-path "/home/admin/" file-name "tmp_commands" file-content @commands --treat-value-as-file-by-prefix @ targets "$1" -s sid.txt`&lt;BR /&gt;mgmt_cli run-script script-name "script_firewall" script "clish -f /home/admin/tmp_commands" targets "MyGTW" -s sid.txt`&lt;BR /&gt;mgmt_cli run-script script-name "remove_script" script "rm /home/admin/tmp_commands" targets "MyGTW" -s sid.txt`&lt;/P&gt;&lt;P&gt;My commands line are located within the file "commands" which will be write inside file tmp_commands on the firewall MyGTW&lt;BR /&gt;The content of the file commands is :&amp;nbsp;&lt;/P&gt;&lt;P&gt;set cloning-group-management on&lt;BR /&gt;delete allowed-client host ipv4-address A.B.C.D&lt;BR /&gt;delete allowed-client host ipv4-address A.B.C.D&lt;BR /&gt;save config&lt;BR /&gt;set cloning-group-management off&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 11:26:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Change-cloning-group-features-with-a-script/m-p/132617#M19667</guid>
      <dc:creator>oconnork</dc:creator>
      <dc:date>2021-10-26T11:26:45Z</dc:date>
    </item>
  </channel>
</rss>

