Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / iptables / extensions / libipt_account.man
blobfcbb179a7a7ff80de8b40f412989590b1754132d
1 Account traffic for all hosts in defined network/netmask.
3 Features:
5 - long (one counter per protocol TCP/UDP/IMCP/Other) and short statistics
7 - one iptables rule for all hosts in network/netmask
9 - loading/saving counters (by reading/writting to procfs entries)
11 .TP
12 .BI "--aaddr " "network/netmask"
13 defines network/netmask for which make statistics.
14 .TP
15 .BI "--aname " "name"
16 defines name of list where statistics will be kept. If no is
17 specified DEFAULT will be used.
18 .TP
19 .B "--ashort"
20 table will colect only short statistics (only total counters
21 without splitting it into protocols.
23 Example usage:
25 account traffic for/to 192.168.0.0/24 network into table mynetwork:
27 # iptables -A FORWARD -m account --aname mynetwork --aaddr 192.168.0.0/24
29 account traffic for/to WWW serwer for 192.168.0.0/24 network into table mywwwserver:
31 # iptables -A INPUT -p tcp --dport 80
32   -m account --aname mywwwserver --aaddr 192.168.0.0/24 --ashort
34 # iptables -A OUTPUT -p tcp --sport 80
35   -m account --aname mywwwserver --aaddr 192.168.0.0/24 --ashort
37 read counters:
39 # cat /proc/net/ipt_account/mynetwork
40 # cat /proc/net/ipt_account/mywwwserver
42 set counters:
44 # echo "ip = 192.168.0.1 packets_src = 0" > /proc/net/ipt_account/mywwserver
46 Webpage:
47   http://www.barbara.eu.org/~quaker/ipt_account/