<?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: Creating Firewall Rules per CLI in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16374#M1099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please post here the commands you are using.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2018 20:58:12 GMT</pubDate>
    <dc:creator>Robert_Decker</dc:creator>
    <dc:date>2018-03-15T20:58:12Z</dc:date>
    <item>
      <title>Creating Firewall Rules per CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16366#M1091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi eXperts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create Firewall rules completely with CLI commands. I started the following Syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@A-SMS:0]# mgmt_cli login user cpadmin -p vpn123 &amp;gt; sid.txt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@A-SMS:0]# mgmt_cli add access-layer name "Bravo_Standard" --format json -s sid.txt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@A-SMS:0]# mgmt_cli add access-rule layer "Bravo_Standard"&amp;nbsp;&amp;nbsp;position 1 name "NetBIOS rule" service.1 "rip" service.2 "bootp" service.3 "NBT service.4 "udp-high-ports" action "drop" --format json -s sid.txt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@A-SMS:0]# mgmt_cli publish -s sid.txt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything looks fine, but I cannot see any policies just added in SmartConsole. Nor can I install the newly created policy with&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Expert@A-SMS:0]# mgmt_cli install-policy policy-package "Bravo_Standard" targets B-GW&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, what I am doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hint will highly be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Yasushi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 16:03:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16366#M1091</guid>
      <dc:creator>Yasushi_Kono1</dc:creator>
      <dc:date>2017-12-06T16:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Firewall Rules per CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16367#M1092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What are you trying to accomplish?&lt;/P&gt;&lt;P&gt;&amp;nbsp;Are you willing to create a&amp;nbsp;rulebase with inline layers (R80.10 style), or just a flat rulebase (R77.30 style)?&lt;/P&gt;&lt;P&gt;Robert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 17:35:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16367#M1092</guid>
      <dc:creator>Robert_Decker</dc:creator>
      <dc:date>2017-12-06T17:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Firewall Rules per CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16368#M1093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to start with the flat rulebase, But. afterwards, I wanted to learn how to create an inline layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yasushi&lt;/P&gt;&lt;P&gt;Von meinem iPhone mithilfe von TouchDown (www.symantec.com) gesendet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 21:23:09 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16368#M1093</guid>
      <dc:creator>Yasushi_Kono1</dc:creator>
      <dc:date>2017-12-06T21:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Firewall Rules per CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16369#M1094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you go - the&amp;nbsp;&lt;STRONG&gt;FLAT&lt;/STRONG&gt; rulebase:&lt;/P&gt;&lt;P&gt;1. create a policy package:&lt;/P&gt;&lt;P&gt;mgmt_cli add package name "my_policy" threat-prevention "false" -s id.txt&lt;/P&gt;&lt;P&gt;2. add the rules to the NETWORK (!!!) layer:&lt;/P&gt;&lt;P&gt;mgmt_cli add access-rule layer "my_policy Network" source "any" destination "h1" service "http" action "accept" track-settings.type "Log" position "1" name "rule1" -s id.txt&lt;/P&gt;&lt;P&gt;3. publish:&lt;/P&gt;&lt;P&gt;mgmt_cli -s id.txt publish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the result in SmartConsole:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="61245" alt="" class="image-1 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/61245_packages.png" style="width: 620px; height: 264px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="61246" alt="" class="image-2 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/61246_rulebase.png" style="width: 620px; height: 83px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please pay attention that the Cleanup Rule is automatically created along with the package creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also add sections, like in R77:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mgmt_cli add access-section layer "my_policy Network" position 1 name "New Section 1" -s id.txt&lt;/P&gt;&lt;P&gt;mgmt_cli -s id.txt publish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="61253" alt="" class="image-3 jive-image j-img-original" src="https://community.checkpoint.com/legacyfs/online/checkpoint/61253_section.png" style="width: 620px; height: 86px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this can assist.&lt;/P&gt;&lt;P&gt;Robert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2017 08:38:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16369#M1094</guid>
      <dc:creator>Robert_Decker</dc:creator>
      <dc:date>2017-12-07T08:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Firewall Rules per CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16370#M1095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tested that and it worked perfectly for me! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for sharing your valuable knowledge with us!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Yasushi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2017 14:34:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16370#M1095</guid>
      <dc:creator>Yasushi_Kono1</dc:creator>
      <dc:date>2017-12-07T14:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Firewall Rules per CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16371#M1096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now, I am about to write a bash script with which I wanted to create policies interactively. At first sight, no big deal. But, if you wanted to add multiple objects (for source, destination or service), I am struggling with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the correct syntax for adding another source object into an existing rule?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mgmt_cli set access-rule layer "Testpol Network" source Host_A -s id.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but then, Host_A replaces the host object instead of being added it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Yasushi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 12:42:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16371#M1096</guid>
      <dc:creator>Yasushi_Kono1</dc:creator>
      <dc:date>2018-02-02T12:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Firewall Rules per CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16372#M1097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use "source.add" syntax. The ".add" allows adding to the existing sources.&lt;/P&gt;&lt;P&gt;&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/set-access-rule~v1.1"&gt;https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/set-access-rule~v1.1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Robert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 15:32:21 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16372#M1097</guid>
      <dc:creator>Robert_Decker</dc:creator>
      <dc:date>2018-02-02T15:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Firewall Rules per CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16373#M1098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the flat rule is not getting added for me through cli command which u have given above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 20:14:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16373#M1098</guid>
      <dc:creator>network_operat2</dc:creator>
      <dc:date>2018-03-15T20:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Firewall Rules per CLI</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16374#M1099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please post here the commands you are using.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 20:58:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Creating-Firewall-Rules-per-CLI/m-p/16374#M1099</guid>
      <dc:creator>Robert_Decker</dc:creator>
      <dc:date>2018-03-15T20:58:12Z</dc:date>
    </item>
  </channel>
</rss>

