<?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: Easy Tool - Real time connection table analysis v4.0 in Scripts</title>
    <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129571#M855</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/21670"&gt;@HeikoAnkenbrand&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;first of all a big thank you for another great tool here for the CheckMates community.&lt;BR /&gt;The script runs on all our gateways. It is a bit slow with more than 100K connection table entries.&lt;BR /&gt;But otherwise a great solution.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Sep 2021 11:11:13 GMT</pubDate>
    <dc:creator>joschuar</dc:creator>
    <dc:date>2021-09-16T11:11:13Z</dc:date>
    <item>
      <title>Easy Tool - Real time connection table analysis v4.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128246#M826</link>
      <description>&lt;TABLE style="border: 1px solid #c6c6c6; border-collapse: separate; border-radius: 5px; background-color: #e15180; padding: 6px; text-indent: 10px;" width="100%"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH align="left"&gt;&lt;SPAN&gt;Overview&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;From version R80.10 to version R81.10.&lt;BR /&gt;&lt;BR /&gt;For many Check Point users the question arises again and again, which connections and services are used by a rule, a port, an destination IP or source IP&amp;nbsp; in real time. For this purpose I have created a small tool, which all information about a rule can be read out in real time from the connection table.&lt;/P&gt;
&lt;P&gt;This is good for optimizing the ruleset, as it provides a real-time view of the connection table with the corresponding info. This can be a good solution in more complex environments to see what this rule really do.&lt;/P&gt;
&lt;P&gt;The following questions can be answered:&lt;/P&gt;
&lt;UL&gt;
&lt;LI class="lia-indent-padding-left-30px"&gt;In which rules is port 443 currently used?&lt;/LI&gt;
&lt;LI class="lia-indent-padding-left-30px"&gt;In which rules is the source or destination IP is used?&lt;/LI&gt;
&lt;LI class="lia-indent-padding-left-30px"&gt;Which connections, ports, protocols and are active for rule xy?&lt;/LI&gt;
&lt;LI class="lia-indent-padding-left-30px"&gt;How many connections are there for rule xy in the TCP SYN, ACK or FIN state?&lt;/LI&gt;
&lt;LI class="lia-indent-padding-left-30px"&gt;How can I simplify rules and combine them, for example, into class C or B networks?&lt;/LI&gt;
&lt;LI class="lia-indent-padding-left-30px"&gt;What IP communication is there e.g. for port 80 or for the rule xy?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This tool will help you quickly answer these questions and many more.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="econn_2.png" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/13678iAC0BB689DCF886D8/image-size/large?v=v2&amp;amp;px=999" role="button" title="econn_2.png" alt="econn_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;TABLE style="border: 1px solid #c6c6c6; border-collapse: separate; border-radius: 5px; background-color: #e15180; padding: 6px; text-indent: 10px;" width="100%"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH align="left"&gt;&lt;SPAN&gt;Tool &lt;BR /&gt;&lt;/SPAN&gt;&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;When you execute this oneliner, a new cli command "econn" will be created.&lt;BR /&gt;After that, you only need to execute the following cli command in expert mode with the parameters.&lt;/P&gt;
&lt;P&gt;The output of the tool always show:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Shows all rules to which the filter applies&lt;/LI&gt;
&lt;LI&gt;Shows all UDP and TCP ports to which the filter applies.&lt;/LI&gt;
&lt;LI&gt;Shows a summary of all TCP (SYN, Syn-ACK, ACK,FIN) , UDP, ICMP, VRRP, IGMP values for the filtered connections.&lt;/LI&gt;
&lt;LI&gt;Indicates which protocols are currently in use (TCP, UDP,...)&lt;/LI&gt;
&lt;LI&gt;Summary of all used Check Point services (https, echo-request, CPD_amon, FW1_log,...)&lt;/LI&gt;
&lt;LI&gt;Incoming and outgoing interface (eth0, bond1.10, ...)&lt;/LI&gt;
&lt;LI&gt;Check Point service names&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Formatted output of the connection table:&lt;/STRONG&gt; &lt;BR /&gt;(rule,&amp;nbsp; protoll&amp;nbsp; ,source IP, source port, destination IP, destination port, session timeout, TCP state, interface in and out, Check Point service)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Since version 3.0 VSX is supported:&lt;BR /&gt;On VSX systems, change to the corresponding virtual system with "vsenv" and execute "econn" on that VS system.&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="background-color: #c0c0c0; height: 46px;"&gt;
&lt;TD width="30%" height="46px"&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Filter Syntax&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="70%" height="46px"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="30%" height="46px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;-a&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="70%" height="46px"&gt;Show the information about the complete connection table.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="68px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;-r &amp;lt;rule number&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD height="68px"&gt;Show the information about a specific rule with the corresponding rule number.&lt;BR /&gt;Inline rules for example 2.1 are not possible. You can only use the base rule in this case 2.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="46px"&gt;&lt;STRONG&gt;-p &amp;lt;port&amp;gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD height="46px"&gt;Show the information about a specific destination port with the corresponding port number.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="24px"&gt;&lt;STRONG&gt;-d &amp;lt;destination IP&amp;gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD height="24px"&gt;Show the information about a specific destination IP with the corresponding IP.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="30%" height="46px"&gt;&lt;STRONG&gt;-s &amp;lt;source IP&amp;gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="70%" height="46px"&gt;Show the information about a specific source IP with the corresponding IP.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="46px"&gt;&lt;STRONG&gt;-g &amp;lt;grep parameter&amp;gt; &lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD height="46px"&gt;Search filter for the corresponding grep parameters in the raw data of "fw ctl conntab".&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="24px"&gt;&lt;STRONG&gt;-e &amp;lt;grep parameter&amp;gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD height="24px"&gt;Search filter for the corresponding grep parameters in the connection table output view.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="background-color: #c0c0c0; height: 46px;"&gt;
&lt;TD width="30%" height="46px"&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Delete Connections&lt;BR /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="70%" height="46px"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="30%" height="46px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;-x&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="70%" height="46px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Attention!!!&lt;/FONT&gt;&lt;/STRONG&gt; &lt;BR /&gt;This parameter deletes all connections from the connection table that match the filters. Grep parameters (-g) cannot be deleted in the combination with this option.&lt;BR /&gt;&lt;BR /&gt;This parameter is only available from &lt;FONT color="#FF9900"&gt;R81 and higher&lt;/FONT&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR style="background-color: #c0c0c0; height: 46px;"&gt;
&lt;TD width="274.517px" height="46px"&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Output extension&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="640.467px" height="46px"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.517px" height="46px"&gt;&lt;STRONG&gt;-c&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.467px" height="46px"&gt;Shows the corresponding connection table entries.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.517px" height="24px"&gt;&lt;STRONG&gt;-t&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.467px" height="24px"&gt;Tip! &lt;BR /&gt;Display possible class C and B networks where the corresponding IP addresses from the connection table would match. This function is good to simplify rules.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.517px" height="24px"&gt;&lt;STRONG&gt;-i&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.467px" height="24px"&gt;Displays only the summarized IP communication. Also used to simplify the set of rules.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;-n &lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;No summary output.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR style="background-color: #c0c0c0; height: 46px;"&gt;
&lt;TD width="258.833px" height="46px"&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;File &lt;BR /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="603.95px" height="46px"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="258.833px" height="46px"&gt;&lt;STRONG&gt;-w &amp;lt;file name&amp;gt; &lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="603.95px" height="46px"&gt;Write connection table to file.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="258.833px" height="24px"&gt;&lt;STRONG&gt;-f &amp;lt;file name&amp;gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="603.95px" height="24px"&gt;
&lt;P&gt;Read connection table from file.&lt;/P&gt;
&lt;P&gt;Important!&lt;BR /&gt;Search filters (-r, -p, -d, -s ) only work when writing the file -w not with the option -f.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border: 1px solid #c6c6c6; border-collapse: separate; border-radius: 5px; background-color: #e15180; padding: 6px; text-indent: 10px;" width="100%"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH align="left"&gt;&lt;SPAN&gt;Examples&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR style="background-color: #c0c0c0; height: 46px;"&gt;
&lt;TD width="274.483px" height="46px"&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Examples&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="46px"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="46px"&gt;&lt;STRONG&gt;# econn -r 10 -c&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="46px"&gt;Shows all basic informations (used Ports, counter TCP/UDP/ICMP...) to rule 10 and displays the appropriate connection table entries.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="46px"&gt;&lt;STRONG&gt;# econn -a&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="46px"&gt;Gives an overview of all connectiontabel entries (used ports, used protocols and counter TCP/UDP/ICMP...).&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="24px"&gt;&lt;STRONG&gt;# econn -p 443 -c&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="24px"&gt;Displays all rules where port 443 is used and prints all connection table entries.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="68px"&gt;&lt;STRONG&gt;# econn -d 1.1.1.1 -c&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="68px"&gt;Displays all rules where destination IP 1.1.1.1 is used and gives an overview of all connection table entries (used ports, used protocols and counter TCP/UDP/ICMP...) and prints all connection table entries.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="68px"&gt;&lt;STRONG&gt;# econn -s 1.1.1.1 -c&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="68px"&gt;Displays all rules where source IP 1.1.1.1 is used and gives an overview of all connection table entries (used ports, used protocols and counter TCP/UDP/ICMP...) and prints all connection table entries.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="24px"&gt;&lt;STRONG&gt;# econn -s 1.1.1.0-1.1.1.255&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="24px"&gt;Displays all rules where source IP range from 1.1.1.1 to 1.1.1.255&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="46px"&gt;&lt;STRONG&gt;# econn -r 10 -t -i&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="46px"&gt;Shows all basic informations to rule 10 and summarizes all IP addresses to possible class C and B networks and output the IP communication summed by source IP's.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="46px"&gt;&lt;STRONG&gt;# econn -p 80 -t -i -c&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="46px"&gt;Shows all possible informations to port 80 in the connection table: rules, connection summaries, used protocols and ports, grouped networks, IP communication&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="24px"&gt;&lt;STRONG&gt;# econn -p 443 -g SYN -c &lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="24px"&gt;Shows all possible informations to port 443 in the connection table with "TCP SYN" state&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="46px"&gt;&lt;STRONG&gt;# econn -r 10 -p 53 -x&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="46px"&gt;&lt;FONT color="#FF0000"&gt;Attention!!!&lt;/FONT&gt; &lt;BR /&gt;Delete all possible connections with port 53 in rule 10 in the connection table.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="24px"&gt;&lt;STRONG&gt;# econn -w test -p 433&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="24px"&gt;&lt;FONT color="#000000"&gt;Write the connection table to tar file where port 443 is used.&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="46px"&gt;&lt;STRONG&gt;# econn -f test -c -e SYN &lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="46px"&gt;&lt;FONT color="#000000"&gt;Read the connection table from tar file and show the output with the filter view option for SYN.&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="274.483px" height="24px"&gt;&lt;STRONG&gt;# econn -n -p 443 -e SYN_SENT&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="640.5px" height="24px"&gt;&lt;FONT color="#000000"&gt;Don't show the connection summary + show connection table for port 443 and TCP state SYN.&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border: 1px solid #c6c6c6; border-collapse: separate; border-radius: 5px; background-color: #e15180; padding: 6px; text-indent: 10px;" width="100%"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH align="left"&gt;&lt;SPAN&gt;Install Tool&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Use this auto installer script from "Spoiler" on the Firewall Gateway as CLI command in expert mode:&lt;/P&gt;
&lt;LI-SPOILER&gt;&lt;LI-CODE lang="markup"&gt;curl_cli -k http://www.ankenbrand24.de/inst_econn &amp;gt; /tmp/inst_econn &amp;amp;&amp;amp; chmod 770 /tmp/inst_econn &amp;amp;&amp;amp; /tmp/inst_econn&lt;/LI-CODE&gt;&lt;/LI-SPOILER&gt;
&lt;P&gt;Or "copy and past" the following script block from "Spoiler" to your Firewall Gateway (in expert mode):&lt;/P&gt;
&lt;LI-SPOILER&gt;&lt;LI-CODE lang="markup"&gt;cat &amp;lt;&amp;lt;EOT &amp;gt; /usr/bin/econn
#!/bin/bash
VERSION="4.0";
SHOW_CONN="0";
SHOW_GROUPED="0";
SHOW_IP="0";
DEL_CONN="0";
SUCHEN="";
FILTER_GREP="-v 'fgsdg'";
ENTRIE_GREP="-v 'hgdfk'";
FILE_Y="0";
FILE_FY="0";
SHOW_SUM="1";
echo "" &amp;gt; /tmp/econn_ip.txt
clear;
echo -e "\e[7m";printf '%.s ' {1..132}; echo;
echo  " Real time connection table analysis                                                                by Heiko Ankenbrand 2021 (v\$VERSION) ";
printf '%.s ' {1..132};echo -e "\e[0m";
IsGATEWAY=`cpprod_util FwIsFirewallModule`;
if [ \$IsGATEWAY != "1" ] ;
  then 
    echo ;
    echo "This is not a gateway!";
    echo ;
    exit 1;
fi
while [[ \$# -gt 0 ]]
do
key1="\$1"
case \$key1 in
    -h|--help.)
       shift;
       echo;
       echo -e "\e[6m";echo -n " Help overview";printf '%.s ' {1..118};echo -e "\e[0m";
       echo 
       echo "Filter Syntax"
       echo "   -a                           Show the information about the complete connection table.";
       echo "   -r &amp;lt;rule number&amp;gt;             Show the information about a specific rule with the corresponding rule number.";
       echo "   -p &amp;lt;port&amp;gt;                    Show the information about a specific destination port with the corresponding port number.";
       echo "   -d &amp;lt;destination IP&amp;gt;          Show the information about a specific destination IP with the corresponding IP.";
       echo "   -d &amp;lt;dIP_start-dIP_end&amp;gt;       Show the information about a specific destination IP range with the corresponding IP.";
       echo "   -s &amp;lt;source IP&amp;gt;               Show the information about a specific source IP with the corresponding IP.";
       echo "   -g &amp;lt;grep parameter&amp;gt;          Filters the search for the corresponding grep parameters.";
       echo ;
       echo "Output extension";
       echo "   -c                           Shows the corresponding connection table entries.";
       echo "   -e                           Is an option that sets a grep filter only on the output of the connection table view.";
       echo "   -t                           Display possible class C and B networks where the corresponding IP addresses from ";
       echo "                                the connection table would match. This function is good to simplify rules.";
       echo "   -i                           Displays only the summarized IP communication. Also used to simplify the set of rules.";
       echo "   -n                           No summary output";
       echo ;
       echo "Delete connection";
       echo "   -x                           Attention!!! This parameter deletes all connections from the connection table that match the "
       echo "                                             filters. Grep parameters (-g) cannot be deleted in the combination with this option.";
       echo "File";
       echo "   -w &amp;lt;file name&amp;gt;               Write connection table to file.";
       echo "   -f &amp;lt;file name&amp;gt;               Read connection table from file."; 
       echo "                                Important!";
       echo "                                Search filters only work when writing the file -w not with the option -f.";
       echo -e "\e[6m";echo -n " Examples";printf '%.s ' {1..123};echo -e "\e[0m";
       echo "# econn -r 10 -c                Shows all basic informations (used Ports, counter TCP/UDP/ICMP...) to rule 10 and displays";
       echo "                                the appropriate connection table entries.";
       echo "# econn -a                      Gives an overview of all connectiontabel entries (used ports, used protocols and counter";
       echo "                                TCP/UDP/ICMP...)";
       echo "# econn -p 443 -c               Displays all rules where port 443 is used and prints all connection table entries.";
       echo "# econn -d 1.1.1.1 -c           Displays all rules where destination IP 1.1.1.1 is used and gives an overview of all ";
       echo "                                connection table entries (used ports, used protocols and counter TCP/UDP/ICMP...) and";
       echo "                                prints all connection table entries.";
       echo "# econn -s 1.1.1.1 -c           Displays all rules where source IP 1.1.1.1 is used and gives an overview of all connection";
       echo "                                table entries (used ports, used protocols and counter TCP/UDP/ICMP...) and prints all";
       echo "                                connection table entries.";   
       echo "# econn -s 1.1.1.0-1.1.1.255    Displays all rules where source IP range from 1.1.1.1 to 1.1.1.255.";
       echo "# econn -r 10 -t -i             Shows all basic informations to rule 10 and summarizes all IP addresses to possible";
       echo "                                class C and B networks and output the IP communication summed by source IP's.";
       echo "# econn -p 80 -t -i -c          Shows all possible informations to port 80 in the connection table: rules, connection ";
       echo "                                summaries, used protocols and ports, grouped networks, IP communication.";
       echo "# econn -p 443 -g SYN -c        Shows all possible informations to port 443 in the connection table with 'TCP SYN' state";
       echo "# econn -r 10 -p 53 -x          Attention!!! Delete all possible connections with port 53 in rule 10 in the connection table.";
       echo "# econn -w test -p 433          Write the connection table to tar file where port 443 is used.";
       echo "# econn -f test                 Read the connection table from tar file and show the output.";
       echo "# econn -f test -c -e SYN       Read the connection table from tar file and show the output with the filter view option for SYN.";
       echo "# econn -n -p 443 -e SYN_SENT   Don't show the connection summary + show connection table for port 443 and TCP state SYN.";
       echo;
       exit 1;
    ;;
    -x|-del)
       shift;
       SHOW_CONN="1";
       DEL_CONN="1";
    ;;
    -n)
       shift;
       SHOW_SUM="0";
       SHOW_CONN="1";
    ;;
    -s|--sip)
       key="\$2";
       FILTER="\$FILTER -sip=\$key";
       SUCHEN="\$SUCHEN Source IP=\$key ";
       shift;
       shift;
    ;; 
    -d|--dip)
       key="\$2";
       FILTER="\$FILTER -dip=\$key"; 
       SUCHEN="\${SUCHEN}Destination IP=\$key ";
       shift;
       shift;
    ;;
    -p|--port)
       key="\$2";
       FILTER="\$FILTER -dport=\$key";
       SUCHEN="\${SUCHEN}DPort=\$key ";
       shift;
       shift;
    ;;
    -a|--all)
       key="\$2";
       FILTER="";
       SUCHEN="Complete connection table!";
       shift;
    ;;
    -r|--role)
       key="\$2";
       FILTER="\$FILTER -rule=\$key"; 
       SUCHEN="\${SUCHEN}Rule=\$key ";
       shift;
       shift;
    ;;
    -g|--grep)
       key="\$2";
       FILTER_GREP="\$key"; 
       SUCHEN="\${SUCHEN}GREP='\$key' ";
       shift;
       shift;
    ;;
    -e)
       ENTRIE_GREP="\$2";
       SHOW_CONN="1";
       if [ "x\$ENTRIE_GREP" = "x" ]
         then
           echo "Parameter -e not correct set!";
           ENTRIE_GREP="-v dsfgdsj";
       fi
       shift;
       shift;
    ;;
    -t|-tip)
       shift;
       SHOW_GROUPED="1";
    ;;
    -i|-ip)
       shift;
       SHOW_IP="1";
    ;;
    -c|-conn)
       SHOW_CONN="1";
       shift;
    ;;
    -w)
       FILE_W="\$2";
       FILE_W="\${FILE_W}.tgz";
       FILE_Y="1";
       shift;
       shift;
    ;;
    -f)
       FILE_F="\$2";
       FILE_F="\${FILE_F}.tgz";
       FILE_FY="1";
       shift;
       shift;
    ;;

    *)
    POSITIONAL+=("\$1") # save it in an array for later
    shift # past argument
    ;;
esac
done
if [ \$FILE_FY == "1" ] ;
  then
     if test -f "\$FILE_F"; 
        then
           echo -e "\e[6m";echo -n " Read connection table from tar archive";printf '%.s ' {1..93};echo -e "\e[0m";
           echo "Read  file     : \$FILE_F";
           tar xzfP \$FILE_F;
           FILTER="";
           SUCHEN="";
           if [ ! -f /tmp/econn_ports ]; then
               echo;
               echo "File /tmp/econn_ports not found in tar!";
               echo;
               exit 1;
           fi
           if [ ! -f /tmp/econn_ip.txt ]; then
               echo;
               echo "File /tmp/econn_ip.txt not found in tar!";
               echo;
               exit 1;
           fi
           if [ ! -f /tmp/econn_if ]; then
               echo;
               echo "File /tmp/econn_if not found in tar!";
               echo;
               exit 1;
           fi
           echo -n "CT entries     : ";
           more /tmp/econn_ip.txt | wc -l;

        else 
           echo;
           echo "File \$FILE_F not exist";
           echo;
           exit 1;
     fi
  else

     fw ctl conntab \$FILTER 2&amp;gt;&amp;amp;1 |grep \$FILTER_GREP | grep -v "Got NULL" |grep -v "gen_services_array Failed" | egrep -v '^\s*$|^#' &amp;gt; /tmp/econn_ip.txt;
     fw ctl iflist &amp;gt; /tmp/econn_if;
     if test -f "\$FWDIR/state/__tmp/FW1/local.set"; then
         more \$FWDIR/state/__tmp/FW1/local.set | grep srv_name | awk '{split(\$0,a,","); print a[1] " " a[3];}' | sed -e 's/: (\"//g' &amp;gt; /tmp/econn_ports;
     fi
fi

if [ \$FILE_Y == "1" ] ;
  then
   echo -e "\e[6m";echo -n " Write connection table to tar archive";printf '%.s ' {1..94};echo -e "\e[0m";
   echo -n "Search filter            : \$SUCHEN";
   tar -czf \$FILE_W -P /tmp/econn_ip.txt /tmp/econn_if /tmp/econn_ports;
   echo;
   echo -n "Connection table entries : ";
   more /tmp/econn_ip.txt | wc -l;
   echo "Written in file          : \$FILE_W";
   echo ;
   exit 1;
fi
if [ \$SHOW_SUM == "1" ] ;
  then 
echo -e "\e[6m";echo -n " Connection Summary";printf '%.s ' {1..113};echo -e "\e[0m";
echo -n "Search         : \$SUCHEN";
vsx_system=\`fw vsx stat 2&amp;gt;&amp;amp;1 | grep -c "VSX is not supported"\`
echo ;
if [ \$vsx_system == "0" ] 
     then
        echo -n "VSX VS         : ";
        vsx_vsenv1=\`vsx get | awk '{split(\$0,a,"("); sub(/ID /, "", a[2]); sub(/)./, "", a[2]);  print a[2]; }'\`
        echo "\$vsx_vsenv1"
fi 
echo -n "Rules          : ";
more /tmp/econn_ip.txt | awk '{print \$6 " "\$2 \$3 \$4 " "\$5 " "\$8}' | sed -e 's/src=//g' | sed -e 's/\],dest=\[/ /g' | sed -e 's/\],/ /g' | sed -e 's/)\;//g' | sed -e 's/\[//g'  | sed -e 's/rule\=/ /g' | sed -e 's/\,/ /g' | sed -e 's/state\=/ /g' | sed -e 's/Ifn[c,s]in\=[0-9]*//g' | sed -e 's/Ifn[c,s]out\=[0-9]*//g' | egrep -v '^\s*$|^#' | awk '{printf "%s, \n", \$1}' 2&amp;gt;&amp;amp;1 | grep -v -E '^[1-9][0-9][0-9][0-9][0-9][0-9]' |grep -v '0,' | sort -n | uniq | tr -d '\n' | sed -e 's/0000002f/GRE/g' | sed -e 's/00000070/VRRP/g' | sed 's/\(.*\),/\1\t/' | sed -e 's/^, //g'  
echo ;
echo -n "Protocoll      : ";
more /tmp/econn_ip.txt | awk '{print \$6 " "\$2 \$3 \$4 " "\$5 " "\$8}' | sed -e 's/src=//g' | sed -e 's/\],dest=\[/ /g' | sed -e 's/\],/ /g' | sed -e 's/)\;//g' | sed -e 's/\[//g'  | sed -e 's/rule\=/ /g' | sed -e 's/\,/ /g' | sed -e 's/state\=/ /g' | sed -e 's/Ifn[c,s]in\=[0-9]*//g' | sed -e 's/Ifn[c,s]out\=[0-9]*//g' | egrep -v '^\s*$|^#' | awk '{printf "%s, \n", \$6}' 2&amp;gt;&amp;amp;1 | sort -n | uniq | tr -d '\n' | sed -e 's/0000002f/GRE/g' | sed -e 's/00000070/VRRP/g' | sed 's/\(.*\),/\1\t/' | sed -e 's/^, //g'
echo;
echo -n "Used Ports     : ";
more /tmp/econn_ip.txt | awk '{print \$6 " "\$2 \$3 \$4 " "\$5 " "\$8}' | sed -e 's/src=//g' | sed -e 's/\],dest=\[/ /g' | sed -e 's/\],/ /g' | sed -e 's/)\;//g' | sed -e 's/\[//g'  | sed -e 's/rule\=/ /g' | sed -e 's/\,/ /g' | sed -e 's/state\=/ /g' | sed -e 's/Ifn[c,s]in\=[0-9]*//g' | sed -e 's/Ifn[c,s]out\=[0-9]*//g' | egrep -v '^\s*$|^#' | awk '{printf "%s %s, \n", \$5, \$6}' 2&amp;gt;&amp;amp;1 | sort -n | uniq | tr -d '\n' | sed -e 's/0000002f/GRE/g' | sed -e 's/00000070/VRRP/g' | sed 's/\(.*\),/\1\t/' | sed -e 's/^ , //g' | sed -e 's/0 ICMP, //g' | sed -e 's/0 IGMP, //g' | sed -e 's/0 VRRP, //g'
echo -e "\n\e[6m";echo -n " Counter";printf '%.s ' {1..124};echo -e "\e[0m";
echo -n '  TCP          : ';more /tmp/econn_ip.txt | grep 'TCP' |wc -l;
echo -n '  TCP  SYN     : ';more /tmp/econn_ip.txt | grep 'SYN_SENT' |wc -l;
echo -n '     SYN-ACK   : ';more /tmp/econn_ip.txt | grep 'SYN_ACK' |wc -l;
echo -n '     ACK       : ';more /tmp/econn_ip.txt | grep 'ESTAB' |wc -l;
echo -n '     FIN       : ';more /tmp/econn_ip.txt | grep 'FIN' |wc -l;
echo -n '  UDP          : ';more /tmp/econn_ip.txt | grep 'UDP' |wc -l
echo -n '  ICMP         : ';more /tmp/econn_ip.txt | grep 'ICMP' |wc -l;
echo -n '  IGMP         : ';more /tmp/econn_ip.txt | grep 'IGMP' |wc -l;
echo -n '  VRRP         : ';more /tmp/econn_ip.txt | grep '00000070)' |wc -l; 
echo -n '  GRE          : ';more /tmp/econn_ip.txt | grep '0000002f)' |wc -l;
echo -e "\e[6m";echo -n " Interface";printf '%.s ' {1..122};echo -e "\e[0m";
echo -n "Incomming      : ";
more /tmp/econn_ip.txt | awk '{split(\$0,a,";"); print a[2];}' |  awk '{split(\$0,b,",") ;print b[4];}' |grep in | sort |uniq &amp;gt; /tmp/econn_in
more /tmp/econn_ip.txt | awk '{split(\$0,a,";"); print a[2];}' |  awk '{split(\$0,b,",") ;print b[5];}' |grep in | sort |uniq &amp;gt;&amp;gt; /tmp/econn_in 
more /tmp/econn_ip.txt | awk '{split(\$0,a,";"); print a[2];}' |  awk '{split(\$0,b,",") ;print b[6];}' |grep in | sort |uniq &amp;gt;&amp;gt; /tmp/econn_in
more /tmp/econn_in | sort |uniq| awk '{split(\$1,c,"=") ;system("cat /tmp/econn_if |grep ^"c[2] ); }' |  awk '{split(\$0,d,":") ;print "," d[2] ;}' |sort | uniq| tr -d '\n' | sed -e 's/^, //g'
echo
echo -n "Outgoing       : ";
more /tmp/econn_ip.txt | awk '{split(\$0,a,";"); print a[2];}' |  awk '{split(\$0,b,",") ;print b[4];}' |grep out | sort |uniq &amp;gt; /tmp/econn_out
more /tmp/econn_ip.txt | awk '{split(\$0,a,";"); print a[2];}' |  awk '{split(\$0,b,",") ;print b[5];}' |grep out | sort |uniq &amp;gt;&amp;gt; /tmp/econn_out 
more /tmp/econn_ip.txt | awk '{split(\$0,a,";"); print a[2];}' |  awk '{split(\$0,b,",") ;print b[6];}' |grep out | sort |uniq &amp;gt;&amp;gt; /tmp/econn_out
more /tmp/econn_out | sort |uniq| awk '{split(\$1,c,"=") ;system("cat /tmp/econn_if |grep ^"c[2] ); }' |  awk '{split(\$0,d,":") ;print "," d[2] ;}' |sort |uniq | tr -d '\n' | sed -e 's/^, //g'
echo
echo -e "\e[6m";echo -n " Services";printf '%.s ' {1..123};echo -e "\e[0m";
echo -n "CP Service     : ";
more /tmp/econn_ip.txt | awk '{split(\$0,a,";"); print a[2];}' |  awk '{split(\$0,b,",") ; print b[3];}' |grep service |grep -v "(" | sort |uniq &amp;gt; /tmp/econn_service_used
more /tmp/econn_ip.txt | awk '{split(\$0,a,";"); print a[2];}' |  awk '{split(\$0,b,",") ; print b[4];}' |grep service |grep -v "(" | sort |uniq &amp;gt;&amp;gt; /tmp/econn_service_used
more /tmp/econn_service_used | sort |uniq| awk '{split(\$1,c,"=") ;system("cat /tmp/econn_ports |grep ^"c[2] ); }' | awk '{split(\$0,b," ") ; print ", " b[2];}' | tr -d '\n' | sed -e 's/^, //g' &amp;gt; /tmp/econn_service_used_all 
more /tmp/econn_ip.txt | awk '{split(\$0,a,";"); print a[2];}' | awk '{split(\$0,b,",") ; print b[3];}' |grep service |grep  "(" |sort |uniq | awk '{split(\$1,s2,"("); sub(/)/, "[[:blank:]]",s2[2]); service_id="^"s2[2]; system("cat /tmp/econn_ports |egrep "service_id)}' |awk '{split(\$0,b," ") ; print ", " b[2];}' | tr -d '\n' &amp;gt;&amp;gt; /tmp/econn_service_used_all
more /tmp/econn_ip.txt | awk '{split(\$0,a,";"); print a[2];}' | awk '{split(\$0,b,",") ; print b[4];}' |grep service |grep  "(" |sort |uniq | awk '{split(\$1,s2,"("); sub(/)/, "[[:blank:]]",s2[2]); service_id="^"s2[2]; system("cat /tmp/econn_ports |egrep "service_id)}' |awk '{split(\$0,b," ") ; print ", " b[2];}' | tr -d '\n' &amp;gt;&amp;gt; /tmp/econn_service_used_all
more /tmp/econn_service_used_all | sed -e 's/, FW1_omi-sic(40)//g' | sed -e 's/^, //g'
echo


fi

if [ \$SHOW_CONN == "1" ] ;
  then
    echo -e "\e[6m";echo -n " Connection Table";printf '%.s ' {1..115};echo -e "\e[0m";
    echo -e "\nRule     Proto        Source IP         S-Port   Destination IP         D-Port     Timeout            State   Interface in   Interface out      Service";
    printf '%.s-' {1..160};
    echo;
    more /tmp/econn_ip.txt | egrep -v '^\s*$|^#'| awk -f /opt/etool/script/econn_awk1 -v vsx_system="\$vsx_system" | sort -n | sed 's/^[1-9][0-9][0-9][0-9][0-9][0-9]/-imp-&amp;gt;/g' | grep \$ENTRIE_GREP;
fi
if [ \$SHOW_GROUPED == "1" ] ;
  then
    echo -e "\e[6m";echo -n " Grouped by";printf '%.s ' {1..121};echo -e "\e[0m";
    # printf '%.s-' {1..50};echo -e "\nGrouped by ";printf '%.s-' {1..50};
    echo -e "\nSource Class C Networks:";
    more /tmp/econn_ip.txt | awk '{print \$6 " "\$2 \$3 \$4 " "\$5 " "\$8}' | sed -e 's/src=//g' | sed -e 's/\],dest=\[/ /g' | sed -e 's/\],/ /g' | sed -e 's/)\;//g' | sed -e 's/\[//g'  | sed -e 's/rule\=/ /g' | sed -e 's/\,/ /g' | sed -e 's/state\=/ /g' | sed -e 's/Ifn[c,s]in\=[0-9]*//g' | sed -e 's/Ifn[c,s]out\=[0-9]*//g' | egrep -v '^\s*$|^#'| awk '{split(\$2,a,"."); printf "\t%s.%s.%s.0\n", a[1],a[2],a[3]}' 2&amp;gt;&amp;amp;1 | sort -n | uniq | sed -e 's/\.\.\.0//g' | sed -e 's/\.\.0\.0//g'
    echo -e "\nSource Class B Networks:";
    more /tmp/econn_ip.txt | awk '{print \$6 " "\$2 \$3 \$4 " "\$5 " "\$8}' | sed -e 's/src=//g' | sed -e 's/\],dest=\[/ /g' | sed -e 's/\],/ /g' | sed -e 's/)\;//g' | sed -e 's/\[//g'  | sed -e 's/rule\=/ /g' | sed -e 's/\,/ /g' | sed -e 's/state\=/ /g' | sed -e 's/Ifn[c,s]in\=[0-9]*//g' | sed -e 's/Ifn[c,s]out\=[0-9]*//g' | egrep -v '^\s*$|^#'| awk '{split(\$2,a,"."); printf "\t%s.%s.0.0\n", a[1],a[2],a[3]}' 2&amp;gt;&amp;amp;1 | sort -n | uniq  | sed -e 's/\.\.\.0//g' | sed -e 's/\.\.0\.0//g'      
    echo -e "\nDestination Class C Networks:";
    more /tmp/econn_ip.txt | awk '{print \$6 " "\$2 \$3 \$4 " "\$5 " "\$8}' | sed -e 's/src=//g' | sed -e 's/\],dest=\[/ /g' | sed -e 's/\],/ /g' | sed -e 's/)\;//g' | sed -e 's/\[//g'  | sed -e 's/rule\=/ /g' | sed -e 's/\,/ /g' | sed -e 's/state\=/ /g' | sed -e 's/Ifn[c,s]in\=[0-9]*//g' | sed -e 's/Ifn[c,s]out\=[0-9]*//g' | egrep -v '^\s*$|^#'| awk '{split(\$4,a,"."); printf "\t%s.%s.%s.0\n", a[1],a[2],a[3]}' 2&amp;gt;&amp;amp;1 | sort -n | uniq | sed -e 's/\.\.\.0//g' | sed -e 's/\.\.0\.0//g'     
    echo -e "\nDestination Class B Networks:";
    more /tmp/econn_ip.txt | awk '{print \$6 " "\$2 \$3 \$4 " "\$5 " "\$8}' | sed -e 's/src=//g' | sed -e 's/\],dest=\[/ /g' | sed -e 's/\],/ /g' | sed -e 's/)\;//g' | sed -e 's/\[//g'  | sed -e 's/rule\=/ /g' | sed -e 's/\,/ /g' | sed -e 's/state\=/ /g' | sed -e 's/Ifn[c,s]in\=[0-9]*//g' | sed -e 's/Ifn[c,s]out\=[0-9]*//g' | egrep -v '^\s*$|^#'| awk '{split(\$4,a,"."); printf "\t%s.%s.0.0\n", a[1],a[2],a[3]}' 2&amp;gt;&amp;amp;1 | sort -n | uniq | sed -e 's/\.\.\.0//g' | sed -e 's/\.\.0\.0//g'
fi
if [ \$SHOW_IP == "1" ] ;
  then
    echo -e "\e[6m";echo -n " IP to IP";printf '%.s ' {1..124};echo -e "\e[0m\n";
    more /tmp/econn_ip.txt | awk '{print \$6 " "\$2 \$3 \$4 " "\$5 " "\$8}' | sed -e 's/src=//g' | sed -e 's/\],dest=\[/ /g' | sed -e 's/\],/ /g' | sed -e 's/)\;//g' | sed -e 's/\[//g'  | sed -e 's/rule\=/ /g' | sed -e 's/\,/ /g' | sed -e 's/state\=/ /g' | sed -e 's/Ifn[c,s]in\=[0-9]*//g' | sed -e 's/Ifn[c,s]out\=[0-9]*//g' | egrep -v '^\s*$|^#' | awk '{printf "%15s         -&amp;gt; \t%15s \n", \$2,\$4}' 2&amp;gt;&amp;amp;1 | sort -n | uniq  
fi
if [ \$DEL_CONN == "1" ] ;
  then
    OS=`cat /etc/cp-release | cut -c 17- | sed 's/^ *//g' | sed 's/\s*\$//g' | cut -c -3 | grep -c '^R8[1-9]'`
    if [[ \$OS == "1" ]] ; 
     then 
      if [[ \$FILTER_GREP == *"fgsdg"* ]] ;
        then
         echo -e "\e[6m";echo -n " Delete Connections";printf '%.s ' {1..114};echo -e "\e[0m\n";
         echo
         echo "&amp;gt;&amp;gt;&amp;gt;&amp;gt; ATTENTION &amp;lt;&amp;lt;&amp;lt;&amp;lt;"
         echo
         echo "This will clear all the connections matching the filter in the connection table!!!"
         echo -n "Are you sure (yes/no)? [n] "
         read DEL_CONN_1
         if [[ \$DEL_CONN_1 == "yes" ]] || [[ \$DEL_CONN_1 == "y" ]] ;
              then
                 echo;
                 echo -n "Are you really sure you want to do this (yes/no)? [n] "
                 FILTER="-x\$FILTER";
                    if [ -f /var/log/econn_delete_connections.txt ]; 
                       then
                          rm /var/log/econn_delete_connections.txt 2&amp;gt;&amp;amp;1&amp;gt; /dev/null;
                    fi
                 echo;
                 echo;
                 echo "###########################################################################################################";
                 echo "There is currently a bug in R81 and R80.10. This means"
                 echo "that deleting does not work correctly, because the filters"
                 echo "do not match. Therefore I have disabled the function."
                 echo;
                 echo "fw ctl contab \$FILTER";
                 echo
                 echo "More read here:"
                 echo "https://community.checkpoint.com/t5/General-Topics/fw-ctl-contab-x-issue-in-R81-10/m-p/128288#M23421"
                 echo;
                 echo "###########################################################################################################";
                 echo;
                 exit 1;
                 fw ctl conntab \$FILTER: &amp;gt; /var/log/econn_delete_connections.txt;
                 echo
                 more /var/log/econn_delete_connections.txt | grep "Nothing done." | sed -e 's/Are you sure (yes\/no)? \[n\] //g'
                 echo
                 echo "All deleted connections respectively the result are listed in the following file:"
                 echo "/var/log/econn_delete_connections.txt";
                 else
                 echo
                 echo "Nothing done.";
         fi
        else
         echo
         echo "You have set grep filter. This does not work with deleting the connections!";
         echo
         echo "Nothing done.";
      fi
     else
        echo "-x is only posible in R81 and above!"
  fi
fi 
echo;
EOT
[ -d "/opt/etool" ]  || mkdir /opt/etool;
[ -d "/opt/etool/script" ]  || mkdir /opt/etool/script; 
cat &amp;lt;&amp;lt;EOT &amp;gt; /opt/etool/script/econn_awk1
{
where=match(\$4, "TCP");
if (where !=0) {  rule=\$6 ; state=\$8; service=\$9 ; timer =\$5 ; proto="TCP"; dst=\$3; src=\$2; if_in=\$10;if_out=\$11; where=match(\$13, "out");  if (where !=0) {if_out=\$13 } } ;
where=match(\$4, "UDP");
if (where !=0) {  rule=\$6 ; state="state=---"; service=\$7 ; timer =\$5 ; proto="UDP"; dst=\$3; src=\$2; if_in=\$8;if_out=\$9; where=match(\$11, "out");  if (where !=0) {if_out=\$11 } } ;
where=match(\$4, "0000002f");
if (where !=0) {  rule=\$6 ; state="state=---"; service=\$7 ; timer =\$5 ; proto="GRE"; dst=\$3; src=\$2; if_in=\$8;if_out=\$9} ;
where=match(\$4, "00000070");
if (where !=0) {  rule=\$6 ; state="state=---"; service=\$7 ; timer =\$5 ; proto="VRRP"; dst=\$3; src=\$2; if_in=\$8;if_out=\$9}   ;
where=match(\$4, "ICMP");
if (where !=0) {  rule=\$6 ; state="state=---"; service=\$7 ; timer =\$5 ; proto="ICMP"; dst=\$3; src=\$2; if_in=\$8;if_out=\$9; where=match(\$11, "out");  if (where !=0) {if_out=\$11 } };
where=match(\$4, "IGMP");
if (where !=0) {  rule=\$6 ; state="state=---"; service=\$7 ; timer =\$5 ; proto="IGMP"; dst=\$3; src=\$2; if_in=\$8;if_out=\$9; where=match(\$11, "out");  if (where !=0) {if_out=\$11 } };
split(service,s,"=");
service=s[2];
sub(/,/, "", service);
where=match(\$service, ")");
if (where !=0) {split(service,s1,"("); service=s1[2];sub(/)/, "", service);}
split(state,h,"=");
state=h[2];
split(rule,h,"=");
rule=h[2];
where=match(\$9, "in");
if (where !=0) { if_in=\$9};
where=match(\$10, "in");
if (where !=0) { if_in=\$10};
where=match(\$11, "in");
if (where !=0) { if_in=\$11};
where=match(\$9, "out");
if (where !=0) { if_out=\$9};
where=match(\$10, "out");
if (where !=0) { if_out=\$10};
where=match(\$11, "out");
if (where !=0) { if_out=\$11};
where=match(\$12, "out");
if (where !=0) { if_out=\$12};
where=match(\$13, "out");
if (where !=0) { if_out=\$13};
split(if_in,h,"=");
if_in=h[2];
split(if_out,h,"=");
if_out=h[2];
split(src,h,"=");
split(h[2],h1,",");
src_ip=h1[1];
src_p=h1[2] ;
split(dst,h,"=");
split(h[2],h1,",");
dst_ip=h1[1];
dst_p=h1[2];
sub(/TCP_ESTABLISHED/, "ESTABLISHED", state);
sub(/,/, "", state);
sub(/,/, "", rule);
sub(/,/, "", timer);
sub(/,/, "", service);
sub(/\[/, "", src_ip);
sub(/\[/, "", dst_ip);
sub(/\]/, "", src_p);
sub(/\]/, "", dst_p);
sub(/,/, "", if_in);
sub(/,/, "", if_out);
read_file_into_array("/tmp/econn_if", File);
where=match(\$service, ")");
if (where ==0) {
read_file_into_array1("/tmp/econn_ports", File1);
service_last=File1[service];
}
else {
service_last=service;
}
if_out_last=File[if_out];
if (length(if_out_last) &amp;lt;= 0) {if_out_last="---";}
if_in_last=File[if_in];
if (length(if_in_last) &amp;lt;= 0) {if_in_last="---";}
if (length(service_last) &amp;lt;= 0) {service_last="---";}
if (proto == "icmp") { dst_p="---"; src_p="---"; }
printf "%.6s \t%6s \t%15s \t%6s \t%15s \t%6s \t%10s \t%11s \t%10s \t%10s \t%.15s \n", rule, proto, src_ip, src_p, dst_ip, dst_p, timer, state , if_in_last, if_out_last, service_last ;
service="";
rule="";
timer="";
state="";
proto="" ;
dst="" ;
src="";
if_in="";
if_out="";
}
function read_file_into_array(file, array     ,status, record, count ) {
   count  = 0;
   while (1) {
      status = getline record &amp;lt; file
      if (status == -1) {
         print "Failed to read file " file;
         exit 1;
      }
      if (status == 0) break;
      split(record,r,":");
      sub(/ /, "", r[1]);
      array[r[1]] = r[2];
   }
   close(file);
   return count
}
function read_file_into_array1(file, array     ,status, record, count ) {
   count  = 0;
   while (1) {
      status = getline record &amp;lt; file
      if (status == -1) {
         print "Failed to read file " file;
         exit 1;
      }
      if (status == 0) break;
      split(record,r," ");
      sub(/ /, "", r[1]);
      array[r[1]] = r[2];
   }
   close(file);
   return count
}
EOT
chmod 770 /usr/bin/econn
chmod 770 /opt/etool/script/econn_awk1

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI-SPOILER&gt;
&lt;TABLE style="border: 1px solid #c6c6c6; border-collapse: separate; border-radius: 5px; background-color: #e15180; padding: 6px; text-indent: 10px;" width="100%"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH align="left"&gt;&lt;SPAN&gt;Version &lt;BR /&gt;&lt;/SPAN&gt;&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;/TABLE&gt;
&lt;P&gt;0.1&amp;nbsp;&amp;nbsp; 08-08-2021 &amp;nbsp; &amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; oneliner to show all connection table entries &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;A href="https://community.checkpoint.com/t5/Scripts/ONELINER-Formatted-Connection-Table/m-p/127770#M821" target="_self"&gt;ONELINER - Formatted Connection Table&lt;/A&gt;)&lt;BR /&gt;0.9&amp;nbsp;&amp;nbsp;&amp;nbsp; 08-12-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Bugs fixed&lt;BR /&gt;1.0&amp;nbsp;&amp;nbsp;&amp;nbsp; 08-26-2021 &amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Version v1.0 - This version only shows info about certain rules &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;SPAN class="lia-message-read"&gt;&lt;FONT style="background-color: #f8f8fa;"&gt;&lt;SPAN&gt;&lt;A href="https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-rule-analysis/m-p/127918#M823" target="_self"&gt;Easy Tool - Real time rule analysis v1.0&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;2.0&amp;nbsp;&amp;nbsp;&amp;nbsp; 08-25-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; New version for filtering by rule, port, dst IP and src IP&lt;BR /&gt;2.1&amp;nbsp;&amp;nbsp;&amp;nbsp; 08-26-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Bugs fixed&lt;BR /&gt;2.2 &amp;nbsp;&amp;nbsp; 08-27-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Add -g grep parameter&lt;BR /&gt;2.3&amp;nbsp;&amp;nbsp;&amp;nbsp; 08-28-2021 &amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Add -x delete parameter &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (This parameter is only available from &lt;FONT color="#000000"&gt;R81 and higher.&lt;/FONT&gt;)&lt;BR /&gt;2.4&amp;nbsp;&amp;nbsp;&amp;nbsp; 08-28-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; There is currently a bug in R81 and R81.10 with "fw ctl conntab -x -rule=3"&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Therefore I have disabled this function -x.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; (&lt;SPAN class="lia-message-read"&gt;&lt;A class="page-link lia-link-navigation lia-custom-event" href="https://community.checkpoint.com/t5/General-Topics/fw-ctl-contab-x-issue-in-R81-10/td-p/128288/jump-to/first-unread-message" target="_blank" rel="noopener"&gt;'fw ctl contab -x' issue in R81.10&lt;/A&gt;&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P&gt;2.5&amp;nbsp;&amp;nbsp;&amp;nbsp; 09-01-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Bugs fixed (conn issue)&lt;BR /&gt;2.6&amp;nbsp;&amp;nbsp;&amp;nbsp; 09-08-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp; &amp;nbsp; Incoming and outgoing interface added&lt;BR /&gt;2.7&amp;nbsp;&amp;nbsp;&amp;nbsp; 09-09-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Check Point service names added&lt;BR /&gt;2.8b&amp;nbsp; 09-09-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Bugs fixed &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ( --&amp;gt; more \$FWDIR/state/__tmp/FW1/ )&lt;BR /&gt;2.9 &amp;nbsp;&amp;nbsp; 09-10-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Now&amp;nbsp; with extended connection table view: &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; incoming interface, outgoing interface, Check Point service name&lt;BR /&gt;2.9i&amp;nbsp;&amp;nbsp; 09-10-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Bugs fixed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (ICMP issues, interface issue, Check Point service issue)&lt;BR /&gt;&lt;BR /&gt;3.0&amp;nbsp;&amp;nbsp;&amp;nbsp; 09-11-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; VSX support&lt;BR /&gt;3.1 &amp;nbsp;&amp;nbsp; 09-11-2021 &amp;nbsp;&amp;nbsp;&amp;nbsp; - &amp;nbsp;&amp;nbsp; Bugs fixed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (option -g issue, VSX "fw ctl conntab" issue)&lt;BR /&gt;3.2&amp;nbsp;&amp;nbsp;&amp;nbsp; 09-12-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Bugs fixed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( option -r /-s /-d /-p /-g issue)&lt;BR /&gt;3.3 &amp;nbsp;&amp;nbsp; 09-13-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Design modification&lt;/P&gt;
&lt;P&gt;4.0&amp;nbsp;&amp;nbsp;&amp;nbsp; 09-15-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; File read and write, added -n no summary output&lt;BR /&gt;4.0f&amp;nbsp;&amp;nbsp; 09-16-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Performance optimization of the script for large connection tables.&lt;BR /&gt;4.0g&amp;nbsp; 09-23-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Add -h option&lt;BR /&gt;4.0h&amp;nbsp; 14-11-2021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Performance optimization for VSX environments&lt;BR /&gt;&lt;BR /&gt;5.0a&amp;nbsp; &amp;nbsp;01-28-2026&amp;nbsp; &amp;nbsp; -&amp;nbsp; &amp;nbsp; now for R82 and R82.10&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border: 1px solid #c6c6c6; border-collapse: separate; border-radius: 5px; background-color: #e15180; padding: 6px; text-indent: 10px;" width="100%"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH align="left"&gt;&lt;SPAN&gt;&lt;FONT color="#FFFFFF"&gt;New version and demo video&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Use version 6.0 or higher:&lt;BR /&gt;&lt;A href="https://community.checkpoint.com/t5/Scripts/ECONN-Easy-Connection-Table-Tool/m-p/255732#M1197" target="_self"&gt;ECONN - Easy Connection Table Tool 6.x&lt;/A&gt;&amp;nbsp;&lt;BR data-start="26" data-end="29" /&gt;&lt;BR /&gt;Here is a demo video for version 6.0:&lt;BR /&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6384313258112w400h206r518" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6384313258112" data-account="6058022097001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058022097001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6384313258112w400h206r518');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.checkpoint.com/t5/video/gallerypage/video-id/6384313258112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2026 14:02:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128246#M826</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2026-01-29T14:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128273#M827</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/21670"&gt;@HeikoAnkenbrand&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The script simplifies the search in the connection table.&lt;BR /&gt;Great idea and thanks for your great contributions.&lt;BR /&gt;&lt;BR /&gt;Small note:&lt;BR /&gt;Unfortunately, the use of multiple filters -p 53 -d 8.8.8.8 does not work.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Aug 2021 08:11:08 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128273#M827</guid>
      <dc:creator>Reimar_W</dc:creator>
      <dc:date>2021-08-28T08:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128281#M828</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/53218"&gt;@Reimar_W&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I reworked this in the script and it now works with multiple filter parameters.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Heiko&lt;/P&gt;</description>
      <pubDate>Sat, 28 Aug 2021 15:43:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128281#M828</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2021-08-28T15:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128289#M829</link>
      <description>&lt;P&gt;It's really cool how you can browse with this tool in the connection tabel.&lt;BR /&gt;This allows you to get information quickly and easily.&lt;BR /&gt;&lt;BR /&gt;Great job&lt;BR /&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/21670"&gt;@HeikoAnkenbrand&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Aug 2021 19:41:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128289#M829</guid>
      <dc:creator>udo_kimmich</dc:creator>
      <dc:date>2021-08-28T19:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128379#M830</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/21670"&gt;@HeikoAnkenbrand&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;nice solution.&lt;BR /&gt;&lt;BR /&gt;What is the state "conn" in the output?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 16:39:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128379#M830</guid>
      <dc:creator>Power_Support</dc:creator>
      <dc:date>2021-08-30T16:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128506#M832</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/55111"&gt;@Power_Support&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Bug is fixed in version 2.5!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 06:01:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128506#M832</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2021-09-01T06:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128886#M835</link>
      <description>&lt;P&gt;Very interesting tool.&lt;BR /&gt;Could you also provide an overview of the interfaces in use?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 18:26:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128886#M835</guid>
      <dc:creator>IgorWeller</dc:creator>
      <dc:date>2021-09-07T18:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128965#M836</link>
      <description>&lt;P&gt;Incoming and outgoing interface added in version 2.6.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 16:07:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128965#M836</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2021-09-08T16:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128993#M837</link>
      <description>&lt;P&gt;Great work Heiko, this will become usefull for almost everyone working with CP&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 06:13:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128993#M837</guid>
      <dc:creator>Svendsen</dc:creator>
      <dc:date>2021-09-09T06:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128996#M838</link>
      <description>&lt;P&gt;Check Point service names added in version 2.7&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 06:55:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/128996#M838</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2021-09-09T06:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129000#M839</link>
      <description>&lt;P&gt;Great tool&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/21670"&gt;@HeikoAnkenbrand&lt;/a&gt;&amp;nbsp;. How about VSX, known problems ?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 07:29:20 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129000#M839</guid>
      <dc:creator>Wolfgang</dc:creator>
      <dc:date>2021-09-09T07:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129087#M840</link>
      <description>&lt;P&gt;From version 2.9 with extended connection table view:&lt;BR /&gt;+ Incoming interface&lt;BR /&gt;+ Outgoing interface&lt;BR /&gt;+ Check Point service name&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="econn_conn_tab.JPG" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/13657iF05335AC8DB2C986/image-size/large?v=v2&amp;amp;px=999" role="button" title="econn_conn_tab.JPG" alt="econn_conn_tab.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 05:41:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129087#M840</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2021-09-10T05:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129088#M841</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/1447"&gt;@Wolfgang&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The script is very complex and I try to integrate VSX. However, one or two functions are not yet VSX compatible. &lt;BR /&gt;Please give me another week or two &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 05:50:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129088#M841</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2021-09-10T05:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129107#M842</link>
      <description>&lt;P&gt;Hi Heiko,&lt;/P&gt;&lt;P&gt;You could add a small option for the top rules using cpstat blades and take the 5 rules and show them .&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 11:44:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129107#M842</guid>
      <dc:creator>fwmeister</dc:creator>
      <dc:date>2021-09-10T11:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129108#M843</link>
      <description>&lt;P&gt;got a few errors (r80.20 hf&amp;nbsp; take188) Yes, I know it's "old". &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;using -t -i -c&lt;/P&gt;&lt;P&gt;awk: fatal: can't open source file `/opt/etool/script/econn_awk1' for reading (No such file or directory)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also&amp;nbsp;&lt;/P&gt;&lt;P&gt;Incomming : sh: -c: line 0: syntax error near unexpected token `('&lt;BR /&gt;sh: -c: line 0: `cat /tmp/econn_if |grep ^domain-udp(122)'&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 11:51:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129108#M843</guid>
      <dc:creator>fwmeister</dc:creator>
      <dc:date>2021-09-10T11:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129109#M844</link>
      <description>&lt;P&gt;ok. Got that /opt/etool error because I just copied the /usr/bin/econn to firewalls instead of "installing" it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 11:54:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129109#M844</guid>
      <dc:creator>fwmeister</dc:creator>
      <dc:date>2021-09-10T11:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129110#M845</link>
      <description>&lt;P&gt;Excellent tool! Thanks for sharing!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 12:01:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129110#M845</guid>
      <dc:creator>fwmeister</dc:creator>
      <dc:date>2021-09-10T12:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v3.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129175#M846</link>
      <description>&lt;P&gt;Bugs fixed in version 2.9:&lt;BR /&gt;- ICMP issues&lt;BR /&gt;- interface issue&lt;BR /&gt;- Check Point service issue&lt;/P&gt;</description>
      <pubDate>Sat, 11 Sep 2021 11:14:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129175#M846</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2021-09-11T11:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v2.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129232#M847</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/1447"&gt;@Wolfgang&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;After a weekend with a lot of programming work I made the script VSX compatible. &lt;BR /&gt;You only need to run the command in a VS instance:&lt;BR /&gt;# vsenv xy&lt;BR /&gt;# econn ...&lt;BR /&gt;&lt;BR /&gt;Now the VS instance should be displayed as shown in the picture:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="econn_3_vsx.png" style="width: 503px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/13679iFA1CEAE1A00244A0/image-size/large?v=v2&amp;amp;px=999" role="button" title="econn_3_vsx.png" alt="econn_3_vsx.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 05:28:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129232#M847</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2021-09-13T05:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Tool - Real time connection table analysis v3.0</title>
      <link>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129308#M848</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/21670" target="_blank"&gt;@HeikoAnkenbrand&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In case of inline rules the -r flag doesn't seem to work.&amp;nbsp; For a example for a rule 2.1,2.2 etc.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="24px"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;-r &amp;lt;rule number&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD height="24px"&gt;Show the information about a specific rule with the corresponding rule number.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 17:29:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Easy-Tool-Real-time-connection-table-analysis-v4-0/m-p/129308#M848</guid>
      <dc:creator>KostasGR</dc:creator>
      <dc:date>2021-09-13T17:29:23Z</dc:date>
    </item>
  </channel>
</rss>

