home *** CD-ROM | disk | FTP | other *** search
/ Enter 1998 December / ENTER12_1.iso / os2 / Injoy / docs / filter.txt < prev    next >
Encoding:
Text File  |  1998-09-01  |  19.3 KB  |  482 lines

  1.    .
  2.    .
  3.    .                                                            FILTER.TXT
  4.    .                                 F/X Packet Filter Plugin Release 0.99
  5.    .                                                     September 1, 1998
  6.    .                          
  7.    .
  8.    .
  9.    .
  10.    .
  11.    .
  12.    .       ____   _    ____ _  _______ _____
  13.    .      |  _ \ / \  / ___| |/ / ____|_   _|
  14.    .      | |_) / _ \| |   | ' /|  _|   | |
  15.    .      |  __/ ___ \ |___| . \| |___  | |
  16.    .      |_| /_/   \_\____|_|\_\_____| |_|
  17.    .
  18.    .
  19.    .       _____ ___ _   _____ _____ ____
  20.    .      |  ___|_ _| | |_   _| ____|  _ \
  21.    .      | |_   | || |   | | |  _| | |_) |
  22.    .      |  _|  | || |___| | | |___|  _ <
  23.    .      |_|   |___|_____|_| |_____|_| \_\
  24.    .
  25.    .
  26.    .
  27.    .
  28.    .
  29.    .
  30.    .                                                    F/X Communications
  31.    .                                                       DK-4300 Holbaek
  32.    .                                                               Denmark
  33.    .                                                 E-mail: support@fx.dk
  34.    .                                                      http://www.fx.dk
  35.    .
  36.    .
  37.    .
  38.    .     Copyright (c) 1998, F/X Communications, All Rights Reserved.
  39.    .
  40.    .
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. ==========================================================================
  48.  C O N T E N T S
  49. =======================================What's Where=======================
  50.  
  51.  
  52.  
  53.    o Description...............................................Simple
  54.    o Installation................................................Easy
  55.    o Features................................................Powerful
  56.    o Setup Guidance...........................................General
  57.    o Filter Attributes.......................................Specific
  58.    o Sample Filters................................To Get You Started
  59.  
  60.  
  61.  
  62.  
  63.  
  64. ==========================================================================
  65.  D E S C R I P T I O N
  66. =================================================Simple===================
  67.  
  68.  
  69.  
  70.    This guide includes all you need to get started with the F/X Packet
  71.    Filter Plugin.
  72.  
  73.    Packet filtering allows TCP/IP packets to be selectively discarded as 
  74.    they flow through the plugin.
  75.  
  76.    The Packet Filter Plugin binaries operate seamlessly with the following
  77.    F/X Communications products:
  78.  
  79.       o InJoy Internet Dialer
  80.       o InJoy Connect PPP Server 
  81.       o Tunnel/2
  82.  
  83.    Configuration is by way of simple ASCII files.
  84.  
  85.  
  86.  
  87.  
  88. ==========================================================================
  89.  I N S T A L L A T I O N
  90. =================================================Easy=====================
  91.  
  92.  
  93.  
  94.    There are two ways of getting the Packet Filter Plugin. Either as a 
  95.    zipped archive ready for extraction into the directory of an above 
  96.    mentioned F/X product, or as an integrated part of the host product.
  97.  
  98.    If you received the plugin as a zipped archive, then extract it with 
  99.    InfoZip's UNZIP.EXE (or PKUNZIP.EXE using the -d option) to create 
  100.    a new /FILTERS subdirectory to contain a sample configuration file.
  101.  
  102.    After installation the new binary file is demand-loaded by the host
  103.    application when needed.
  104.  
  105.    Please consult the host-application documentation for possible extra
  106.    installation guidelines.
  107.  
  108.  
  109.  
  110.  
  111. ==========================================================================
  112.  F E A T U R E S
  113. =================================================Powerful=================
  114.  
  115.  
  116.  
  117.    o The Packet Filter Plugin allows all attributes in a packet to be used 
  118.      as a filtering trigger to selectively discard packets when presented.
  119.      These packet attributes (and others listed in Guidance, below) can be 
  120.      used to cause filtering:
  121.  
  122.      - Incoming traffic
  123.      - Outgoing traffic
  124.      - Source and Destination IP numbers (via netmask match)
  125.      - Protocol match (TCP, UDP, ICMP)
  126.      - Service match (FTP, WWW, TELNET, GOPHER, etc)
  127.      - Bit-match (e.g. FIN or SYN bit of TCP)
  128.      - Byte pattern match at specified offset
  129.      - Byte pattern search
  130.  
  131.  
  132.    o The Plugin supports compound Boolean filters for complex filtering
  133.      with great flexibility.
  134.  
  135.    o There are three possible filter states: 
  136.  
  137.      - Always active
  138.      - Active when product is off-line
  139.      - Inactive (but easily activated)
  140.  
  141.    o The plugin reports errors to the file FILTERS.ERR in the home 
  142.      directory of the host-application.
  143.  
  144.    o Filters are easily identified by linkable names.
  145.  
  146.    o Filters may have human readable comments attached.
  147.  
  148.    o Filter usage report at the touch of a key. This feature 
  149.      depends on the host product.
  150.  
  151.    o Filtering plugs in as a separate loadable component, maintaining
  152.      a modular design.
  153.  
  154.  
  155.  
  156.  
  157. ==========================================================================
  158.  S E T U P    G U I D A N C E
  159. =================================================General==================
  160.  
  161.  
  162.  
  163.    o Configuration Files
  164.  
  165.      Filters are specified in one or more ASCII configuration files. Each
  166.      configuration file can contain one or more filters, each identified 
  167.      by a name and a set of attribute/parameter values.
  168.  
  169.      The plugin expects no more than 3 different configuration files. They
  170.      are:
  171.  
  172.      - FILTERS.CNF
  173.  
  174.        This file is in the base directory of the host application. It 
  175.        contains template values used in all user created filters. This 
  176.        means that any attribute value you specify in your own filters will
  177.        override the default values specified in this file.
  178.  
  179.  
  180.      - .\FILTERS\FILTERS.CNF
  181.    
  182.        This file contains the actual user crafted filters. The file is 
  183.        usually located in the FILTERS subdirectory of the host 
  184.        application but may be setup differently, depending on the host's
  185.        capabilities.  See the following Filter Attribute section for 
  186.        syntax information.
  187.  
  188.  
  189.      - FILTERS.DCT
  190.  
  191.        This file is in the base directory of the host application. It is a
  192.        descriptor file that instructs the Filter Plugin about allowable
  193.        attributes in the FILTER.CNF files.
  194.  
  195.        This file should NOT be modified. However, if you take the time to 
  196.        become familiar with it, you will be able to use it as a quick
  197.        reference when writing/modifying filters. Otherwise the following
  198.        specific attributes be of interest.
  199.  
  200.  
  201.  
  202. ==========================================================================
  203.  F I L T E R   A T T R I B U T E S
  204. =================================================Specific=================
  205.  
  206. -----------------    ---------------       ------------------------------      
  207. ATTRIBUTE            POSSIBLE VALUES       DESCRIPTION
  208. -----------------    ---------------       ------------------------------
  209.  
  210. Filter-Status        Passive               Tells when the filtering is 
  211.                      Offline               active. 'Passive' means the
  212.                      Always                filter is not active at all.
  213.  
  214.                                            'Offline' means the filter is 
  215.                                            active when the host 
  216.                                            application is not connected. 
  217.                                            This could be (for example) 
  218.                                            the InJoy dialer that is 
  219.                                            offline, waiting for a packet 
  220.                                            to trigger Dial On Demand.
  221.  
  222.                                            'Always' means that the filter 
  223.                                            is active at all times,
  224.                                            disregarding the connect state 
  225.                                            of the host application.
  226.  
  227.  
  228. -----------------    ---------------       ------------------------------
  229. Filter-Scope         Incoming-Packets      Defines which packets that are 
  230.                      Outgoing-Packets      exposed to the filter. Outgoing 
  231.                                            or incoming.
  232.  
  233.  
  234. -----------------    ---------------       ------------------------------
  235. Filter-Root          Yes                   Only filters that have 
  236.                      No                    'Filter-Root' set to 'Yes' are 
  237.                                            loaded by the host application 
  238.                                            and used.
  239.  
  240.                                            Filters not carrying this flag 
  241.                                            are only used if specifically 
  242.                                            addressed by other filters as 
  243.                                            part of a compound filter.
  244.  
  245. -----------------    ---------------       ------------------------------
  246. Source-IP            An IP address         The source IP address in the 
  247.                                            packet is compared to the 
  248.                                            value of this attribute. Please 
  249.                                            keep the 'Source-Netmask' in 
  250.                                            mind.
  251.  
  252.                                            Leave field empty if you do not 
  253.                                            wish to filter using the 
  254.                                            source IP address as criteria.
  255.  
  256.  
  257. -----------------    ---------------       ------------------------------
  258. Source-Netmask       Netmask               The 'Source-IP' address, 
  259.                                            together with the 
  260.                                            'Source-Netmask' denote a mask 
  261.                                            with which  source IP addresses 
  262.                                            from the IP packets are 
  263.                                            compared.
  264.  
  265.  
  266. -----------------    ---------------       ------------------------------
  267. Destination-IP       IP address            The 'Destination-IP' address, 
  268.                                            together with the 
  269.                                            'Destination-Netmask' denote a 
  270.                                            mask with which destination IP 
  271.                                            addresses from the IP packets 
  272.                                            are compared.
  273.  
  274.                                            Leave field empty if you do not 
  275.                                            wish to filter using the 
  276.                                            destination IP address as 
  277.                                            criteria.
  278.  
  279.  
  280. -----------------    ---------------       ------------------------------
  281. Destination-Netmask  Netmask               The 'Destination-IP' address, 
  282.                                            together with the 
  283.                                            'Destination-Netmask' denote a 
  284.                                            mask with which destination IP 
  285.                                            addresses from the IP packets 
  286.                                            are compared.
  287.  
  288.  
  289. -----------------    ---------------       ------------------------------
  290. Port                 Any number            The 'Port' attribute defines 
  291.                      Or, one of these:     the type of service that a 
  292.                        DNS                 packet is carrying. You may 
  293.                        FTP                 specify either the number or 
  294.                        FTP-DATA            lettered value for the 
  295.                        GOPHER              service.
  296.                        SMTP                
  297.                        SNMP                Leave the field empty if you do
  298.                        SNMP-TRAP           not wish to filter using this 
  299.                        TELNET              criteria.
  300.                        TFTP
  301.                        NETBIOS
  302.                        NETBIOS-NS
  303.                        NETBIOS-SSN
  304.                        NNTP
  305.                        POP2
  306.                        POP3
  307.                        WWW
  308.  
  309.  
  310. -----------------    ---------------       ------------------------------
  311. Protocol             Any number            Each IP header holds a protocol 
  312.                      Or, one of these:     byte that can be addressed by 
  313.                        ICMP                this attribute.
  314.                        TCP
  315.                        UDP                 Leave field empty if you do not 
  316.                                            wish to filter using this 
  317.                                            criteria.
  318.  
  319.  
  320. -----------------    ---------------       ------------------------------
  321. Bit-Number           Positive number       This attribute is part of the 
  322.                                            bit field checking, allowing a 
  323.                                            certain bit to be checked 
  324.                                            within an IP packet (see the 
  325.                                            'Bit-Value' parameter).
  326.  
  327.                                            This is particularly useful for 
  328.                                            checking the bit flags in the 
  329.                                            TCP header.
  330.          
  331.                                            Leave field empty if you do not 
  332.                                            wish to filter using this 
  333.                                            criteria.
  334.  
  335.  
  336. -----------------    ---------------       ------------------------------
  337. Bit-Value            Binary value 0 or 1   This attribute is part of the 
  338.                                            bit field checking.
  339.  
  340.                                            When you check a certain bit 
  341.                                            within a packet, then you 
  342.                                            should use this attribute to 
  343.                                            specify whether the bit should 
  344.                                            have the value of 0 or 1.
  345.  
  346.                                            Leave field empty if you do not 
  347.                                            wish to filter using this 
  348.                                            criteria.
  349.  
  350.  
  351. -----------------    ---------------       ------------------------------
  352. Offset-Relativity    Packet-Start          This attribute is part of the 
  353.                      TCP-Head-Start        hex string matching criteria.
  354.                      Data-Start
  355.                                            Specifying an offset into an IP
  356.                                            packet often doesn't make 
  357.                                            sense, due to various options 
  358.                                            that be used on and off. 
  359.                                            Accordingly this parameter 
  360.                                            lets you define a certain point 
  361.                                            within a packet from where the 
  362.                                            offset is used (refer to the 
  363.                                            'Offset' attribute).
  364.  
  365.                                            Leave field empty if you do not 
  366.                                            wish to filter using this
  367.                                            criteria.
  368.  
  369.  
  370. -----------------    ---------------       ------------------------------
  371. Offset               Any number            This attribute is part of the 
  372.                      Or 'Search-All'       hex string matching criteria,
  373.                                            allowing you to specify an 
  374.                                            offset into an IP packet
  375.                                            for hex string checking (see 
  376.                                            also the 'Offset-Relativity' 
  377.                                            attribute).
  378.  
  379.                                            To search the entire packet, 
  380.                                            simply specify the value 
  381.                                            'Search-All'.
  382.  
  383.                                            Leave field empty if you do not 
  384.                                            wish to filter using this
  385.                                            criteria.
  386.  
  387.  
  388. -----------------    ---------------       ------------------------------
  389. Hex-String           A string              This attribute is part of the 
  390.                      (See filter samples)  hex string matching criteria,
  391.                                            Letting you specify a string to
  392.                                            be searched for within a 
  393.                                            packet. The string can contain 
  394.                                            both normal characters and 
  395.                                            hex notation.
  396.  
  397.                                            Leave field empty if you do not 
  398.                                            wish to filter using this 
  399.                                            criteria.
  400.  
  401.  
  402. -----------------    ---------------       ------------------------------
  403. Action               Drop-Packet           Specifies the action taken when 
  404.                      Next-Filter           a filter matches a packet.
  405.                      Forward-Packet
  406.  
  407.  
  408. -----------------    ---------------       ------------------------------
  409. Next-Filter          Name of a filter      Specifies the name of a 
  410.                                            compound filter that will be
  411.                                            run when the filter is matched 
  412.                                            and the action attribute is 
  413.                                            set to 'Next-Filter'.
  414.  
  415.  
  416. -----------------    ---------------       ------------------------------
  417. Comment              A string              A free-text comment for easy 
  418.                                            identifiable filters.
  419.  
  420.  
  421.  
  422.  
  423. ==========================================================================
  424.  S A M P L E   F I L T E R S
  425. =================================================To Get You Started=======
  426.  
  427.  
  428. ICMP-FILTER        Filter-Status = Always,
  429.             Filter-Root = Yes,
  430.             Comment = "Remove ICMP using Protocol matching",
  431.             Filter-Scope = Incoming-Packets,
  432.             Protocol = ICMP,
  433.             Action = Drop-Packet,
  434.  
  435.  
  436. PORN-FILTER        Filter-Status = Always,
  437.             Filter-Root = Yes,
  438.             Comment = "Filter WWW using IP Address matching",
  439.             Filter-Scope = Outgoing-Packets,
  440.             Protocol = TCP,
  441.             Port = WWW,
  442.                         Source-IP = "10.2.0.0",
  443.             Destination-IP = "207.126.124.139",
  444.             Source-Netmask = "255.255.0.0",
  445.             Destination-Netmask = "255.255.255.255",
  446.             Action = Drop-Packet,
  447.  
  448.  
  449. NETBIOS-KEEP-ALIVE    Filter-Status = Always,
  450.             Filter-Root = Yes,
  451.             Comment = "Remove Keep-Alive via Hex-String match",
  452.             Filter-Scope = Outgoing-Packets,
  453.             Protocol = UDP,
  454.             Port = NETBIOS,
  455.             Offset-Relativity = Data-Start,
  456.             Offset = 0,
  457.             Hex-String = "JustAnExample\x00\x02\x0DBOZO",
  458.             Action = Drop-Packet,
  459.  
  460.  
  461. FIN-PACKETS        Filter-Status = Always,
  462.             Filter-Root = Yes,
  463.             Comment = "Remove FIN pkts using Bit matching",
  464.             Filter-Scope = Outgoing-Packets,
  465.             Protocol = TCP,
  466.             Bit-Number = 264,
  467.             Bit-Value = 1,
  468.             Action = Drop-Packet,
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475. ██████████████████████████████████████████████████████████████████████████
  476.  
  477.         Copyright (c) 1998 F/X Communications.  All rights reserved.
  478.  
  479.  
  480.  
  481.  
  482.