home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / tvis1219.zip / TVisor-read.txt < prev    next >
Text File  |  2002-12-10  |  8KB  |  216 lines

  1.             TVisor (TrafficVisor)
  2.             ---------------------
  3.  
  4.     1. Introduction
  5.     2. Requiriments
  6.     3. Installation
  7.     4. Setting up
  8.        4.1 Config file
  9.        4.2 Statistic rules defining file
  10.        4.3 Using comment key to stat.php script and TVisorClient
  11.     5. Starting
  12.     6. Contacts
  13.     7. Appreciations
  14.  
  15.  
  16. 1. Introduction
  17.  
  18. This program is to trace and count IP-traffic in a LAN and on gateways.
  19. Results are stored in the text-files or can be obtained via TCP/IP connection.
  20.  
  21. 2. Requirements
  22.  
  23. Program was tested on these OS/2 versions: Merlin, Aurora, and Aurora CP2 with
  24. IBM TCP/IP 4.3. Program requires IPSpy package that can be found at Hobbes
  25. archive (http://hobbes.nmsu.edu). Program is small enough and requires only
  26. 50Kb of HDD space, but output files can require much more space.
  27.  
  28.  
  29. 3. Installation
  30.  
  31. Installation process includes two phases - IPSpy installation, and unpacking
  32. tvisor-??????.zip file to the desired directory.
  33. 1. Create directory to install TVisor (for example, C:\TVisor).
  34. 2. Install IPSpy: copy ipspy.dll to the just created directory or to the any
  35. directory listed in the LIBPATH= statement of your CONFIG.SYS file. If you need
  36. promiscuous mode (listening for all packets in the LAN), install ipspy.os2
  37. driver according to the IPSpy instructions.
  38. 3. Unpack tvisor-??????.zip archive to the created directory.
  39.  
  40.  
  41. 4. Setting up
  42.  
  43. 4.1 Config file
  44.  
  45. By default, all configuration stored in the tvisor.cfg file located in the
  46. tvisor.exe directory.
  47. Any empty lines, or lines begins with "#" characters are ignored.
  48. Keywords and their values are described below:
  49.  
  50. interface - defines interface on which IP-packets have to be analyzed.
  51. Values: lanN (or pppN) [LMode], where N - interface number, and LMode is the
  52. desired listening mode. LMode is counted as sum of the following standard
  53. modes:
  54.     DIRECTED_MODE - 1
  55.     BROADCAST_MODE - 2
  56.     PROMISCUOUS_MODE - 4
  57.     SOURCE_ROUTING_MODE - 8
  58. By default LMode is equal 3 (DIRECTED_MODE + BROADCAST_MODE).
  59.  
  60. There can be several "interface" keywords.
  61. Sample:
  62.     interface lan0 1
  63.     interface lan1 3
  64.     interface ppp0
  65.  
  66. rules - defines external file where rules of packets counting are stored
  67. (more details in 4.2).
  68. Default value - rules.lst
  69. Sample: rules TRules.lst
  70.  
  71. StatFile - defines filename where all analyze output will be stored (in the
  72. other words - statistic's file).
  73. Default value - tvision.stat
  74. Sample: StatFile statistics.out
  75.  
  76. SaveStatFreq - frequency (in seconds) of saving output to the statistic's file
  77. (see StatFile).
  78. Default value - 86400
  79. Sample: SaveStatFreq 3600
  80.  
  81. Reset - defines when all obtained statistics have to be cleaned. Format:
  82. YYMMDDHHMM. For example, if you need to clear statistic every 1st day of each
  83. month at midnight, the desired value will be: 010000; to every day at
  84. afternoon - 1200; every year at 21st of April at afternon - 04211200; clear
  85. only once at 2005, 21st of April at afternoon - 0504211200. After clearing
  86. event, when next data portion is arrived, the current stat-file will be renamed
  87. to X.X.0 (X.X - value of StatFile parameter), old X.X.0 will be renamed to
  88. X.X.1, and so on, and will be created new file X.X the arrived data will be
  89. stored into until next clear event.
  90. By default obtained data is never cleared.
  91. Sample: Reset 010000
  92.  
  93. StatHistoryCount - number of stored stat-files.
  94.  
  95. Port - TCP-port on which program listens for an user's requests to show up
  96. requested information.
  97. By default this mode is disabled.
  98. Sample: Port 5460
  99.  
  100.  
  101. 4.2 File of rules to count
  102.  
  103. When next IP packet is arrived, the rules are looked over in their order in
  104. file they stored. If suitable rule is found the whole stats for this rule is
  105. increased for an packet's size. Next, if that rule has "calc" type, the next
  106. suitable rule will be looked over; or, if that rule has "deny" type, look
  107. process is stopped.
  108.  
  109. Alls empty lines, and lines beginning from "#" symbol (comments) are ignored.
  110.  
  111. Each rule begins from string "rule deny" or "rule calc", and ends by string
  112. "end rule". Between these lines the condituions and comments can be placed:
  113.  
  114. comment - optional but very useful key just for comment the rule.
  115.  
  116. interface - interface for this rule; if this keyword is omited the rule will
  117. be applyed for packets from all interfaces. There can be several "interface"
  118. keywords in the rule's file. You can point out only those interfaces that are
  119. defined in the config file.
  120. Sample: interface lan2
  121.  
  122. srcaddr - IP-address of sender
  123. srcmask - mask of sender
  124. dstaddr - IP-address of receiver
  125. dstmask - mask of receiver
  126.  
  127. Address combened with netmask defines the address or group of addresses, for
  128. instance:
  129.  
  130. 192.168.123.3 mask 255.255.255.255 - points to the address 192.168.123.3;
  131. 192.168.123.0 mask 255.255.255.0 - points to the addresses 192.168.123.0-192.168.123.255;
  132. 0.0.0.0 mask 0.0.0.0 - points to the any address;
  133.  
  134. ICMP - list ICMP-services of sender/receiver
  135. UDP  - list of UDP-ports of sender/receiver
  136. TCP  - list of TCP-ports of sender/receiver
  137.  
  138. Ports are defined in a form of "Source List:Target List". Lists can contain
  139. one or more value or range, delimited by comma, or "*" meaning range 0-65535. 
  140. Examples:
  141.     TCP 0-8079,8081-65535:* - source - all ports excluding 8080,
  142.                   target - any port
  143.     UDP *:* - packets from any port to any port
  144.         TCP *:80 - from any port to port 80.
  145.  
  146. To simplify defining of close rules you can use directive "include" in a form of:
  147.  
  148. include "file name" v0 v1 ... v9
  149.  
  150. This directive performs including the file "file name" into main file with
  151. substituting of all %0 ... %9 to the values of v0 .. v9.
  152. If failname of value vN contains spaces it has to be bordered by double
  153. quotation marks ". Included file "file name" can also contain another "include"
  154. directives.
  155.  
  156.  
  157. 4.3 Using "comment" directive for a stat.php script and TVisorClient
  158.  
  159. There is a script stat.php in an archive tvisor-??????.zip. This script allows
  160. creating of readable HTML-page from statistics files. There is also a GUI
  161. application TVisorClient to display statistics obtained via TCPIP connection
  162. from server. The stat.php as well as TVisorClient displays information using
  163. "comment" directives from rule's file. This value has a form of:
  164.  
  165. comment group:send/receive:user
  166.  
  167. where,
  168.     group - logical group of rules, for example local_users or dialup_users;
  169.     send/receive - direction (send or receive);
  170.     user - end name, for example, username or computer name.
  171.  
  172. While parsing these comments the rules are seen by pair. For example, if there
  173. is a rule with comment "Our users:send:John Black" and a rule with comment
  174. "Our users:receive:John Black" there will be only one line while output for
  175. the user "John Black" from group "Our users" with data of sent and recieved
  176. packets.
  177.  
  178.  
  179. 5. Starting
  180.  
  181. Executable tvisor.exe can be started with the following optional command line
  182. parameters:
  183.  
  184. -C - before starting the current stat file is read up and used to "resume"
  185.      after program restarting.
  186.  
  187. -D - debug mode. Info of all packets is displayed on screen: addresses and ports
  188.      of sender and receiver, packet size, action:
  189.     calc - rule is found for this packet
  190.     not calc - rule is not found for this packet
  191.     skip - packet is already counted and going through another interface
  192.      Don't use this mode on a gateway with huge traffic.
  193.  
  194. -S - send a signal to the running tvisor:
  195.     stop - stop the program
  196.     getstat - obtain statistics and put it in file immediately
  197.     reset - reset all values
  198.  
  199. -? - help of command line parameters
  200.  
  201.  
  202. 6. Contacts
  203.  
  204. My e-mail: vav@sahen.elektra.ru
  205. Also, I can be found in eCSNet IRC-network (irc.ecomstation.ru) on #common and
  206. #ecs channels (nick - Digi)
  207. Latest versions: ftp://vdn.sahen.elektra.ru/pub/dev/
  208.  
  209. 7. Appreciations:
  210.  
  211. Edgar Buerkle - for his IPSpy package
  212. Timur Kazimirov - for the help.
  213.  
  214.                         Andrey Vasilkin aka Digi
  215.  
  216.