Главная страница


ru.linux

 
 - RU.LINUX ---------------------------------------------------------------------
 From : Artem Babadzhanyants                 2:5030/922     24 Oct 2001  22:31:50
 To : All
 Subject : iptables (счетчик)
 -------------------------------------------------------------------------------- 
 
 
 Подскажите, что не так ? Счетчики pkt и byte - все время ноль, хотя траффик
 ессно есть.
 
 скрипт нормально создает цепочки:
 
 --------
 #!/bin/bash
 
 IPTABLES="/usr/sbin/iptables"
 NETWORK="192.168.16"
 START=11
 STOP=60
 COUNT=$START;
 
         while [ $COUNT -le $STOP ]; do
 
                 $IPTABLES -N $NETWORK.$COUNT
                 $IPTABLES -A INPUT \
                         -d $NETWORK.$COUNT -j $NETWORK.$COUNT
                 $IPTABLES -A OUTPUT \
                         -s $NETWORK.$COUNT -j $NETWORK.$COUNT
 
                 $IPTABLES -A $NETWORK.$COUNT  \
                         -d $NETWORK.$COUNT
                 $IPTABLES -A $NETWORK.$COUNT  \
                         -s $NETWORK.$COUNT
 
                 let COUNT=$COUNT+1;
 
         done;
 
 ---------------
 далее делаем iptables -nL -x -v
 и видим:
 Chain 192.168.16.11 (6 references)
     pkts      bytes target     prot opt in     out     source
        0        0            all  --  *      *       0.0.0.0/0
        0        0            all  --  *      *       192.168.16.11
 
 Chain 192.168.16.12 (6 references)
     pkts      bytes target     prot opt in     out     source
        0        0            all  --  *      *       0.0.0.0/0
        0        0            all  --  *      *       192.168.16.12
 
 Chain 192.168.16.13 (6 references)
     pkts      bytes target     prot opt in     out     source
        0        0            all  --  *      *       0.0.0.0/0
        0        0            all  --  *      *       192.168.16.13
 Help me !
 Bye
 Artem
 
 ---
  * Origin: MB-Telescope Station (2:5030/922)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 iptables (счетчик)   Artem Babadzhanyants   24 Oct 2001 22:31:50 
 Re: iptables (counters)   Aleksey Barabanov   25 Oct 2001 00:34:48 
 iptables (counters)   Artem Babadzhanyants   25 Oct 2001 10:40:50 
 Re: iptables (counters)   Aleksey Barabanov   25 Oct 2001 14:11:56 
 Re: iptables (counters)   Al Zaharov   26 Oct 2001 02:12:23 
 Re: iptables (счетчик)   yx   25 Oct 2001 04:39:02 
Архивное /ru.linux/22833bd7432c.html, оценка 2 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional