
----
   FreeBSD 4.11.   ipfw, 
natd (divert   ).   -  /etc/firewall.conf.


----
    .     
  .       
.


---------
   .    ,
        , 
 ..        
.


-------
       ipcad +
qbe1t (http://sf.net/projects/qbe1t) + . , 
  ,   ipcad,   
     qbe1t,   
   .       -
    ,     
 .  ,      
.
          
 ,      .
  ,  , 
 ,      
 ,      SQL.
    SQL   .  
    sqlite.
      Python.   
  sqlite   Python   (bind)
pyslite.
      ,    
   (ipcad)      , 
    (   
      ,  
    , ..     
 ).
..    :

  1.  ipcad  
  2.   N .       (ipcad.db)
  3.           
        FTP   ,   
          .    -
       .

 
-----------------
       :
* empty  http://empty.sourceforge.net/ (c)  
         
  ,      -. 
* ipcad  http://lionet.info/ipcad/ (c)  
   
* python  http://python.org ()   
    Python
* sqlite  http://www.sqlite.org/ (c)  
          SQL
* pysqlite  http://initd.org/tracker/pysqlite (c)  
  bind  sqlite-   Python

 
--------
    /var/log/ipcad/ipcad.db.    
 : stat  dump.   stat    
( ipfw  /   ..),   dump - 
,     ipcad.

 #sqlite3 /var/log/ipcad/ipcad.db
 SQLite version 3.3.7
 Enter ".help" for instructions
 sqlite> .schema stat
 CREATE TABLE stat(
    ipfw_in_p int,ipfw_in_b int,ipfw_out_p int,ipfw_out_b int,ipcad_stat text,
    date int);
 sqlite> .schema dump
 CREATE TABLE dump(
   src text,dst text,packets int,bytes int,srcport int,dstport int,proto int,
   if text,date int);

 ,     : text  int.  
   : '192.168.1.1', .  -   ,  
 , ..   ,   N  (
""   ipcad.db)   .    int  
  150915,   15-  09:15.   , ..:
 1) ""    = 1 
 2)       (  ) 
     
  :
ipfw_in_p -     (divert)  ipfw
ipfw_in_b -     (divert)  ipfw
ipfw_out_p, ipfw_out_b - 
ipcad_stat - ,  ipcad-   rsh 127.0.0.1 stat
  dump -    ipcad-  rsh 127.0.0.1 sh ip acco

 
---------------
   .   7   cron- 
    ipcad  /var/log/ipcad/ipcad.db (
   !)    traffl.sh,
  trafstfl.py.     ( 
 cron)   trafst.sh,   
m4     -  HTML-.
   trafstq.py,   
   HTML .      ""
      HTML-  HTML-
     .   -  HTML ,
   traf.08.2006.html, . (, !).  
       FTP  
 empty.  (ipcad.db) ,    
   ;   ipcad.db.


-------
    :
  ./usr -     /usr
  ./etc -     /etc
crontab -   crontab-,  "" 
    .
trafst.sh, known_hosts     .


-----
         .
   .   ,
      
. ,     
.      SOHO.
  - cron-,   
,   shell. ,    
 ,   Python.  
      ,
, NetFlow:      Shell-
trafst.st,       ""
 NetFlow      ipcad 
-     , 
          1.


-------------
 ,     (c),   
        ipcad!

LICENSED
--------
GNU LGPL -    ;)