<?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 Python script to install access rules on check point R80.40 - add multiple ports in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/148918#M6817</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Making use of cpapi, I can write some python scripts to add access rules from an excel file into a check point firewall R80.40&lt;/P&gt;&lt;P&gt;This is the youtube link that I demo the process.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=8D4XJ3Bwtrk" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=8D4XJ3Bwtrk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One of the limitations of the python scripts is that I can only add a single source IP address, a single destination address and a single port for a given row (or a given single rule number).&lt;/P&gt;&lt;P&gt;But in my work environment, a single rule number most likely contains multiple&amp;nbsp;&amp;nbsp;source IP addresses,&amp;nbsp;multiple&amp;nbsp;&amp;nbsp;destination addresses and&amp;nbsp;multiple ports, such as the sample excel that I upload in this post (ADD_RULES_real_world.xlsx).&lt;/P&gt;&lt;P&gt;It would be great if you could shed some light.&lt;/P&gt;&lt;P&gt;(You can see or download my source code from the youtube link as the file .py is not supported here.)&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Marty&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 12:08:20 GMT</pubDate>
    <dc:creator>martylee</dc:creator>
    <dc:date>2022-05-19T12:08:20Z</dc:date>
    <item>
      <title>Python script to install access rules on check point R80.40 - add multiple ports</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/148918#M6817</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Making use of cpapi, I can write some python scripts to add access rules from an excel file into a check point firewall R80.40&lt;/P&gt;&lt;P&gt;This is the youtube link that I demo the process.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=8D4XJ3Bwtrk" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=8D4XJ3Bwtrk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One of the limitations of the python scripts is that I can only add a single source IP address, a single destination address and a single port for a given row (or a given single rule number).&lt;/P&gt;&lt;P&gt;But in my work environment, a single rule number most likely contains multiple&amp;nbsp;&amp;nbsp;source IP addresses,&amp;nbsp;multiple&amp;nbsp;&amp;nbsp;destination addresses and&amp;nbsp;multiple ports, such as the sample excel that I upload in this post (ADD_RULES_real_world.xlsx).&lt;/P&gt;&lt;P&gt;It would be great if you could shed some light.&lt;/P&gt;&lt;P&gt;(You can see or download my source code from the youtube link as the file .py is not supported here.)&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Marty&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 12:08:20 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/148918#M6817</guid>
      <dc:creator>martylee</dc:creator>
      <dc:date>2022-05-19T12:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to install access rules on check point R80.40 - add multiple ports</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/148930#M6818</link>
      <description>&lt;P&gt;I'm not able to download the code. From the video, it looks like when you're creating the objects, you set obj_src and obj_dst to be equal to a given name, rather than appending the name to a list. Thus, when you use obj_src and obj_dst later to make the API call to create the rule, they only contain one thing each.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 17:21:32 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/148930#M6818</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2022-05-18T17:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to install access rules on check point R80.40 - add multiple ports</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/148973#M6820</link>
      <description>&lt;P&gt;Zip and share python code here please.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 08:21:25 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/148973#M6820</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2022-05-19T08:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to install access rules on check point R80.40 - add multiple ports</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/149017#M6825</link>
      <description>&lt;P&gt;Hi _Val_,&lt;/P&gt;&lt;P&gt;thanks for your reminder. It is shared here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 12:04:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/149017#M6825</guid>
      <dc:creator>martylee</dc:creator>
      <dc:date>2022-05-19T12:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to install access rules on check point R80.40 - add multiple ports</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/149018#M6826</link>
      <description>&lt;P&gt;Hi Bob,&lt;/P&gt;&lt;P&gt;Thank you for giving me some directions. Will try to work on it about using list.&lt;/P&gt;&lt;P&gt;Already fixed the link on youtube and the source code is zipped here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 12:06:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/149018#M6826</guid>
      <dc:creator>martylee</dc:creator>
      <dc:date>2022-05-19T12:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to install access rules on check point R80.40 - add multiple ports</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/149278#M6827</link>
      <description>&lt;P&gt;Hi Bob, _Val_ and everyone,&lt;/P&gt;&lt;P&gt;Thanks Bob for providing me a direction on using list. It works like a charm. Another questions are:&lt;/P&gt;&lt;P&gt;1. how to add groups (grouping of different subnets), what is the parameters or keyword I should use in the python script ?&lt;/P&gt;&lt;P&gt;2. how to add port range eg: tcp port 1000-200 ? Again I don't know the parameter of keywords.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 17:32:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/149278#M6827</guid>
      <dc:creator>martylee</dc:creator>
      <dc:date>2022-05-23T17:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to install access rules on check point R80.40 - add multiple ports</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/149676#M6838</link>
      <description>&lt;P&gt;You may download the source code as below link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=xgh4M6TvlxE" target="_blank"&gt;https://www.youtube.com/watch?v=xgh4M6TvlxE&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 17:04:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/149676#M6838</guid>
      <dc:creator>martylee</dc:creator>
      <dc:date>2022-05-29T17:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to install access rules on check point R80.40 - add multiple ports</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/203662#M8306</link>
      <description>&lt;P&gt;Thanks great demo.&lt;/P&gt;&lt;P&gt;just a question, when I run the script a second time, does it create the objects like host ... again ?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 16:05:25 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Python-script-to-install-access-rules-on-check-point-R80-40-add/m-p/203662#M8306</guid>
      <dc:creator>aheilmaier</dc:creator>
      <dc:date>2024-01-19T16:05:25Z</dc:date>
    </item>
  </channel>
</rss>

