<?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 Como apagar uma entrada na tabela de conexões com ips específicos no Checkpoint in Português</title>
    <link>https://community.checkpoint.com/t5/Portugu%C3%AAs/Como-apagar-uma-entrada-na-tabela-de-conex%C3%B5es-com-ips/m-p/98558#M29</link>
    <description>&lt;P&gt;Eu gostaria de compartilhar com todos uma &lt;U&gt;melhoria&lt;/U&gt; no script para apagar um conexão na tabela automaticamente.&lt;/P&gt;&lt;P&gt;A ideia do ajuste veio a partir do post abaixo.&lt;/P&gt;&lt;P&gt;Créditos para o post Original:&lt;A href="https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/How-to-manually-delete-an-entry-from-the-Connections-Table/m-p/13122" target="_blank" rel="noopener"&gt;https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/How-to-manually-delete-an-entry-from-the-Connections-Table/m-p/13122&lt;/A&gt;&lt;BR /&gt;O script coleta e converte os ips específicos e faz a limpeza na tabela de conexão, pode ser utilizado em todas as versões R80.X&lt;/P&gt;&lt;P&gt;(esse post foi criado também no CheckMates em Inglês)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Crie um arquivo com o conteúdo abaixo (ex:del_conn.sh)&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&lt;STRONG&gt;#!/bin/bash&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;logfile="$0.log"&lt;/P&gt;&lt;P&gt;help() {&lt;BR /&gt;echo -e "Drop connection from table\n"&lt;BR /&gt;echo -e "Usage: "&lt;BR /&gt;echo -e "\t $0 &amp;lt;Source&amp;gt; &amp;lt;Destination&amp;gt;"&lt;BR /&gt;echo -e "e.g."&lt;BR /&gt;echo -e "\t $0 10.10.10.10 20.20.20.20"&lt;BR /&gt;echo -e ""&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;main() {&lt;BR /&gt;if [[ $# -ne 2 ]]; then&lt;BR /&gt;help&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;BR /&gt;IPA=$1&lt;BR /&gt;IPB=$2&lt;/P&gt;&lt;P&gt;echo "Are you sure to delete connections on IP $1 and $2? [y/N]"&lt;BR /&gt;read confirm2&lt;BR /&gt;if [ "$confirm2" != "y" -a "$confirm2" != "Y" ]&lt;BR /&gt;then&lt;BR /&gt;echo "Aborted by user!!!!"&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;/P&gt;&lt;P&gt;IPAHEX=`printf '%02x' ${IPA//./ }`;&lt;BR /&gt;IPBHEX=`printf '%02x' ${IPB//./ }`;&lt;/P&gt;&lt;P&gt;echo "Parameters: Source: $IPA ($IPAHEX) | Destination: $IPB ($IPBHEX)"&lt;/P&gt;&lt;P&gt;OIFS=IFS&lt;BR /&gt;IFS=$'\n'&lt;BR /&gt;count=0&lt;BR /&gt;echo "Querying table connection"&lt;BR /&gt;for li in `fw tab -t connections -u | grep "$IPAHEX" | grep "$IPBHEX" | grep "^&amp;lt;0000000"`; do&lt;BR /&gt;count=$((count+1))&lt;BR /&gt;echo "Record match: $li"&lt;BR /&gt;for cmd in `echo "$li" | awk '{print $1" "$2" "$3" "$4" "$5" "$6}' |sed 's/ //g' |sed 's/&amp;lt;//g' |sed 's/&amp;gt;//g' |sed 's/;//g'`; do&lt;BR /&gt;echo "Running: fw tab -t connections -x -e $cmd"&lt;BR /&gt;eval "fw tab -t connections -x -e $cmd"&lt;BR /&gt;echo "Result: $?"&lt;BR /&gt;done&lt;BR /&gt;done&lt;BR /&gt;IFS=OIFS&lt;BR /&gt;echo "Founded: $count record(s)"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;main $1 $2 | tee -a $logfile&lt;/P&gt;&lt;P&gt;-------------------&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Ajuste o arquivo para execução:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- dos2unix del_conn.sh&lt;BR /&gt;- chmod +x del_conn.sh&lt;/P&gt;&lt;P&gt;- Teste script conforme o exemplo abaixo:&lt;BR /&gt;&lt;STRONG&gt;Usage:&lt;/STRONG&gt;&lt;BR /&gt;./del_conn.sh &amp;lt;Source&amp;gt; &amp;lt;Destination&amp;gt;&lt;BR /&gt;e.g.&lt;BR /&gt;./del_conn.sh 10.10.10.10 20.20.20.20&lt;/P&gt;&lt;P&gt;[Expert@FW2_R8040:0]# ./del_conn.sh 10.10.10.125 8.8.8.8&lt;BR /&gt;Are you sure to delete connections on IP 10.10.10.125 and 8.8.8.8? [y/N]&lt;BR /&gt;y&lt;BR /&gt;Parameters: Source: 10.10.10.125 (&lt;STRONG&gt;0a0a0a7d&lt;/STRONG&gt;) | Destination: 8.8.8.8 (&lt;STRONG&gt;08080808&lt;/STRONG&gt;)&lt;BR /&gt;Querying table connection&lt;BR /&gt;Record match: &amp;lt;00000001, 08080808, 00000000, 0a0a0a7d, 00005871, 00000001&amp;gt; -&amp;gt; &amp;lt;00000000, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; (00000805)&lt;BR /&gt;Running: fw tab -t connections -x -e 00000001,08080808,00000000,0a0a0a7d,00005871,00000001&lt;BR /&gt;Entry &amp;lt;00000001, 08080808, 00000000, 0a0a0a7d, 00005871, 00000001&amp;gt;&lt;BR /&gt;deleted from table connections&lt;BR /&gt;Result: 0&lt;BR /&gt;Record match: &amp;lt;00000001, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; -&amp;gt; &amp;lt;00000000, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; (00000802)&lt;BR /&gt;Running: fw tab -t connections -x -e 00000001,0a0a0a7d,00005871,08080808,00000000,00000001&lt;BR /&gt;&amp;lt;00000001, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; not found in table connections&lt;BR /&gt;Result: 0&lt;BR /&gt;Record match: &amp;lt;00000000, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001; 00010001, 40006080, 00000000, 00000176, 00000000, 5f7f12a1, 00000000, c9b5574b, e911ea8e, 00000002, 00000002, 00000001, 00000001, 00000000, 00000000, 80000080, 00000000, 00000000, 956bc748, 00007f91, 00000000, 00000000, 00000000, 00000000, 00000000, 00000000, 00000000, 00000000, df1f9800, 00000000, 00000000, 00000000, 00000000, 00000000; 7/30&amp;gt;&lt;BR /&gt;Running: fw tab -t connections -x -e 00000000,0a0a0a7d,00005871,08080808,00000000,00000001&lt;BR /&gt;&amp;lt;00000000, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; not found in table connections&lt;BR /&gt;Result: 0&lt;BR /&gt;Record match: &amp;lt;00000000, 08080808, 00000000, c0a80284, 0000a989, 00000001&amp;gt; -&amp;gt; &amp;lt;00000000, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; (00000806)&lt;BR /&gt;Running: fw tab -t connections -x -e 00000000,08080808,00000000,c0a80284,0000a989,00000001&lt;BR /&gt;&amp;lt;00000000, 08080808, 00000000, c0a80284, 0000a989, 00000001&amp;gt; not found in table connections&lt;BR /&gt;Result: 0&lt;BR /&gt;Founded: 4 record(s)&lt;BR /&gt;[Expert@FW2_R8040:0]#&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-panel lia-panel-standard MessageTagsTaplet Chrome lia-component-message-view-widget-tags"&gt;&lt;DIV class="lia-decoration-border"&gt;&lt;DIV class="lia-decoration-border-top"&gt;&lt;DIV&gt;** Estou anexando um arquivo já pronto.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 08 Oct 2020 14:19:59 GMT</pubDate>
    <dc:creator>Edilson_Lyrio</dc:creator>
    <dc:date>2020-10-08T14:19:59Z</dc:date>
    <item>
      <title>Como apagar uma entrada na tabela de conexões com ips específicos no Checkpoint</title>
      <link>https://community.checkpoint.com/t5/Portugu%C3%AAs/Como-apagar-uma-entrada-na-tabela-de-conex%C3%B5es-com-ips/m-p/98558#M29</link>
      <description>&lt;P&gt;Eu gostaria de compartilhar com todos uma &lt;U&gt;melhoria&lt;/U&gt; no script para apagar um conexão na tabela automaticamente.&lt;/P&gt;&lt;P&gt;A ideia do ajuste veio a partir do post abaixo.&lt;/P&gt;&lt;P&gt;Créditos para o post Original:&lt;A href="https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/How-to-manually-delete-an-entry-from-the-Connections-Table/m-p/13122" target="_blank" rel="noopener"&gt;https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/How-to-manually-delete-an-entry-from-the-Connections-Table/m-p/13122&lt;/A&gt;&lt;BR /&gt;O script coleta e converte os ips específicos e faz a limpeza na tabela de conexão, pode ser utilizado em todas as versões R80.X&lt;/P&gt;&lt;P&gt;(esse post foi criado também no CheckMates em Inglês)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Crie um arquivo com o conteúdo abaixo (ex:del_conn.sh)&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&lt;STRONG&gt;#!/bin/bash&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;logfile="$0.log"&lt;/P&gt;&lt;P&gt;help() {&lt;BR /&gt;echo -e "Drop connection from table\n"&lt;BR /&gt;echo -e "Usage: "&lt;BR /&gt;echo -e "\t $0 &amp;lt;Source&amp;gt; &amp;lt;Destination&amp;gt;"&lt;BR /&gt;echo -e "e.g."&lt;BR /&gt;echo -e "\t $0 10.10.10.10 20.20.20.20"&lt;BR /&gt;echo -e ""&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;main() {&lt;BR /&gt;if [[ $# -ne 2 ]]; then&lt;BR /&gt;help&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;BR /&gt;IPA=$1&lt;BR /&gt;IPB=$2&lt;/P&gt;&lt;P&gt;echo "Are you sure to delete connections on IP $1 and $2? [y/N]"&lt;BR /&gt;read confirm2&lt;BR /&gt;if [ "$confirm2" != "y" -a "$confirm2" != "Y" ]&lt;BR /&gt;then&lt;BR /&gt;echo "Aborted by user!!!!"&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;/P&gt;&lt;P&gt;IPAHEX=`printf '%02x' ${IPA//./ }`;&lt;BR /&gt;IPBHEX=`printf '%02x' ${IPB//./ }`;&lt;/P&gt;&lt;P&gt;echo "Parameters: Source: $IPA ($IPAHEX) | Destination: $IPB ($IPBHEX)"&lt;/P&gt;&lt;P&gt;OIFS=IFS&lt;BR /&gt;IFS=$'\n'&lt;BR /&gt;count=0&lt;BR /&gt;echo "Querying table connection"&lt;BR /&gt;for li in `fw tab -t connections -u | grep "$IPAHEX" | grep "$IPBHEX" | grep "^&amp;lt;0000000"`; do&lt;BR /&gt;count=$((count+1))&lt;BR /&gt;echo "Record match: $li"&lt;BR /&gt;for cmd in `echo "$li" | awk '{print $1" "$2" "$3" "$4" "$5" "$6}' |sed 's/ //g' |sed 's/&amp;lt;//g' |sed 's/&amp;gt;//g' |sed 's/;//g'`; do&lt;BR /&gt;echo "Running: fw tab -t connections -x -e $cmd"&lt;BR /&gt;eval "fw tab -t connections -x -e $cmd"&lt;BR /&gt;echo "Result: $?"&lt;BR /&gt;done&lt;BR /&gt;done&lt;BR /&gt;IFS=OIFS&lt;BR /&gt;echo "Founded: $count record(s)"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;main $1 $2 | tee -a $logfile&lt;/P&gt;&lt;P&gt;-------------------&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Ajuste o arquivo para execução:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- dos2unix del_conn.sh&lt;BR /&gt;- chmod +x del_conn.sh&lt;/P&gt;&lt;P&gt;- Teste script conforme o exemplo abaixo:&lt;BR /&gt;&lt;STRONG&gt;Usage:&lt;/STRONG&gt;&lt;BR /&gt;./del_conn.sh &amp;lt;Source&amp;gt; &amp;lt;Destination&amp;gt;&lt;BR /&gt;e.g.&lt;BR /&gt;./del_conn.sh 10.10.10.10 20.20.20.20&lt;/P&gt;&lt;P&gt;[Expert@FW2_R8040:0]# ./del_conn.sh 10.10.10.125 8.8.8.8&lt;BR /&gt;Are you sure to delete connections on IP 10.10.10.125 and 8.8.8.8? [y/N]&lt;BR /&gt;y&lt;BR /&gt;Parameters: Source: 10.10.10.125 (&lt;STRONG&gt;0a0a0a7d&lt;/STRONG&gt;) | Destination: 8.8.8.8 (&lt;STRONG&gt;08080808&lt;/STRONG&gt;)&lt;BR /&gt;Querying table connection&lt;BR /&gt;Record match: &amp;lt;00000001, 08080808, 00000000, 0a0a0a7d, 00005871, 00000001&amp;gt; -&amp;gt; &amp;lt;00000000, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; (00000805)&lt;BR /&gt;Running: fw tab -t connections -x -e 00000001,08080808,00000000,0a0a0a7d,00005871,00000001&lt;BR /&gt;Entry &amp;lt;00000001, 08080808, 00000000, 0a0a0a7d, 00005871, 00000001&amp;gt;&lt;BR /&gt;deleted from table connections&lt;BR /&gt;Result: 0&lt;BR /&gt;Record match: &amp;lt;00000001, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; -&amp;gt; &amp;lt;00000000, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; (00000802)&lt;BR /&gt;Running: fw tab -t connections -x -e 00000001,0a0a0a7d,00005871,08080808,00000000,00000001&lt;BR /&gt;&amp;lt;00000001, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; not found in table connections&lt;BR /&gt;Result: 0&lt;BR /&gt;Record match: &amp;lt;00000000, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001; 00010001, 40006080, 00000000, 00000176, 00000000, 5f7f12a1, 00000000, c9b5574b, e911ea8e, 00000002, 00000002, 00000001, 00000001, 00000000, 00000000, 80000080, 00000000, 00000000, 956bc748, 00007f91, 00000000, 00000000, 00000000, 00000000, 00000000, 00000000, 00000000, 00000000, df1f9800, 00000000, 00000000, 00000000, 00000000, 00000000; 7/30&amp;gt;&lt;BR /&gt;Running: fw tab -t connections -x -e 00000000,0a0a0a7d,00005871,08080808,00000000,00000001&lt;BR /&gt;&amp;lt;00000000, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; not found in table connections&lt;BR /&gt;Result: 0&lt;BR /&gt;Record match: &amp;lt;00000000, 08080808, 00000000, c0a80284, 0000a989, 00000001&amp;gt; -&amp;gt; &amp;lt;00000000, 0a0a0a7d, 00005871, 08080808, 00000000, 00000001&amp;gt; (00000806)&lt;BR /&gt;Running: fw tab -t connections -x -e 00000000,08080808,00000000,c0a80284,0000a989,00000001&lt;BR /&gt;&amp;lt;00000000, 08080808, 00000000, c0a80284, 0000a989, 00000001&amp;gt; not found in table connections&lt;BR /&gt;Result: 0&lt;BR /&gt;Founded: 4 record(s)&lt;BR /&gt;[Expert@FW2_R8040:0]#&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-panel lia-panel-standard MessageTagsTaplet Chrome lia-component-message-view-widget-tags"&gt;&lt;DIV class="lia-decoration-border"&gt;&lt;DIV class="lia-decoration-border-top"&gt;&lt;DIV&gt;** Estou anexando um arquivo já pronto.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Oct 2020 14:19:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Portugu%C3%AAs/Como-apagar-uma-entrada-na-tabela-de-conex%C3%B5es-com-ips/m-p/98558#M29</guid>
      <dc:creator>Edilson_Lyrio</dc:creator>
      <dc:date>2020-10-08T14:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Como apagar uma entrada na tabela de conexões com ips específicos no Checkpoint</title>
      <link>https://community.checkpoint.com/t5/Portugu%C3%AAs/Como-apagar-uma-entrada-na-tabela-de-conex%C3%B5es-com-ips/m-p/121498#M38</link>
      <description>&lt;P&gt;Obrigado Edilson!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 20:37:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Portugu%C3%AAs/Como-apagar-uma-entrada-na-tabela-de-conex%C3%B5es-com-ips/m-p/121498#M38</guid>
      <dc:creator>Tierre_Amaral</dc:creator>
      <dc:date>2021-06-17T20:37:57Z</dc:date>
    </item>
  </channel>
</rss>

