<?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: Blocking TOR exit nodes with Python and R80.10 API in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/39452#M2454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very nice, good work!&lt;/P&gt;&lt;P&gt;Please note that we have a python development SDK for API developers on github -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/CheckPoint-APIs-Team/cp_mgmt_api_python_sdk" title="https://github.com/CheckPoint-APIs-Team/cp_mgmt_api_python_sdk"&gt;GitHub - CheckPoint-APIs-Team/cp_mgmt_api_python_sdk: Check Point API Python Development Kit&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is an open source and includes usage examples.&lt;/P&gt;&lt;P&gt;Robert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Feb 2018 09:08:34 GMT</pubDate>
    <dc:creator>Robert_Decker</dc:creator>
    <dc:date>2018-02-12T09:08:34Z</dc:date>
    <item>
      <title>Blocking TOR exit nodes with Python and R80.10 API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/39451#M2453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote a script in Python&amp;nbsp;using our API. The goal was clear, block around 1k IP addresses automatically and in a visual way, not through fw sam rules &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;You can execute this script every day manually or you can schedule it using Crontab for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tu use it in your environment you just need to change these variables at the begining and execute it!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/62988_pastedImage_5.png" style="width: 338px; height: 184px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find the script here:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/toledanosjesus/chkp" title="https://github.com/toledanosjesus/chkp"&gt;GitHub - toledanosjesus/chkp&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the first execution of the script, you just need to configure correctly your firewall policy. You need to have something similar to this:&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/62986_pastedImage_2.png" style="width: 1032px; height: 93px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be aware this script is using &lt;STRONG&gt;python 2.7&lt;/STRONG&gt;. You'll need to modify it a bit in case you want to use python 3.x&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enjoy!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 06:37:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/39451#M2453</guid>
      <dc:creator>Jesús_Toledano</dc:creator>
      <dc:date>2018-02-12T06:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking TOR exit nodes with Python and R80.10 API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/39452#M2454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very nice, good work!&lt;/P&gt;&lt;P&gt;Please note that we have a python development SDK for API developers on github -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/CheckPoint-APIs-Team/cp_mgmt_api_python_sdk" title="https://github.com/CheckPoint-APIs-Team/cp_mgmt_api_python_sdk"&gt;GitHub - CheckPoint-APIs-Team/cp_mgmt_api_python_sdk: Check Point API Python Development Kit&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is an open source and includes usage examples.&lt;/P&gt;&lt;P&gt;Robert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 09:08:34 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/39452#M2454</guid>
      <dc:creator>Robert_Decker</dc:creator>
      <dc:date>2018-02-12T09:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking TOR exit nodes with Python and R80.10 API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/39453#M2455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like this one, too !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 09:24:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/39453#M2455</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2018-02-12T09:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking TOR exit nodes with Python and R80.10 API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/39454#M2456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nice script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Mar 2018 09:51:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/39454#M2456</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2018-03-04T09:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking TOR exit nodes with Python and R80.10 API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/68253#M4137</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Nice script and probably&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;best used with drop templates / optimized drops (&lt;/SPAN&gt;&lt;SPAN&gt;sk90861) enabled and with some consideration of rule position.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 08:45:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/68253#M4137</guid>
      <dc:creator>Chris_Atkinson</dc:creator>
      <dc:date>2019-11-24T08:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking TOR exit nodes with Python and R80.10 API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/68255#M4138</link>
      <description>&lt;P&gt;Better use&amp;nbsp;&lt;SPAN&gt;SecureXL penalty box. It is a mechanism that performs an early drop of packets arriving from suspected sources.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Controls the IP blacklist in SecureXL. The blacklist blocks all&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;traffic&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to and from the specified IP addresses. It is an easy way to block certain IP addresses quickly and eficiently on SecureXL level.&lt;/P&gt;
&lt;P&gt;The blacklist drops occur in SecureXL, which is more efficient than an Access Control Policy or SAM rule to drop the packets. This can be very helpful e.g. with DoS attacks to block an IP on SecureXL level.&lt;/P&gt;
&lt;P&gt;For example, the traffic from and to IP 1.2.3.4 should be blocked at SecureXL level.&lt;/P&gt;
&lt;P&gt;On gateway set the IP 1.2.3.4 to Secure XL blacklist:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;#&amp;nbsp;&lt;STRONG&gt;fwaccel dos blacklist -a 1.2.3.4&lt;/STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;On gateway displays all IP's on the SecureXL blacklist:&lt;/P&gt;
&lt;P&gt;#&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;fwaccel dos blacklist -s&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;On gateway delete the IP 1.2.3.4 from Secure XL blacklist:&lt;/P&gt;
&lt;P&gt;#&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;fwaccel dos blacklist -d 1.2.3.4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;More to&amp;nbsp;SecureXL penalty box read here&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.checkpoint.com/docs/DOC-3407-r80x-performance-tuning-tip-ddos-fw-sam-vs-fwaccel-dos" target="_blank" rel="noopener"&gt;R80.x - Performance Tuning Tip - DDoS „fw sam“ vs. „fwaccel dos“&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have created a script to execute this command on all gateways at the same time or on a singel gateway.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Read more about this script here:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/GAIA-Easy-execute-CLI-commands-from-management-on-gateways/m-p/50764/highlight/true#M3759" target="_self"&gt;- GAIA - Easy execute CLI commands from management on gateways&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/GAIA-Easy-execute-CLI-commands-on-all-gateways-simultaneously/m-p/50883/highlight/true#M3783" target="_self"&gt;- GAIA - Easy execute CLI commands on all gateways simultaneously&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I execute this script in a loop on the management server and submit all tor network IP's from management to gateway.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Advantage:&lt;/STRONG&gt; I can adjust the addresses almost in real time and don't have to install a policy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 09:26:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/68255#M4138</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2019-11-24T09:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking TOR exit nodes with Python and R80.10 API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/68258#M4139</link>
      <description>&lt;P&gt;nice&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 09:31:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/68258#M4139</guid>
      <dc:creator>Josef_Pecher</dc:creator>
      <dc:date>2019-11-24T09:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Blocking TOR exit nodes with Python and R80.10 API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/81708#M4725</link>
      <description>Nice. Does it still work with the R80.40 version?</description>
      <pubDate>Mon, 13 Apr 2020 18:02:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Blocking-TOR-exit-nodes-with-Python-and-R80-10-API/m-p/81708#M4725</guid>
      <dc:creator>quannl12</dc:creator>
      <dc:date>2020-04-13T18:02:10Z</dc:date>
    </item>
  </channel>
</rss>

