iptables-1.3.2-20050720
[iptables.git] / extensions / libipt_account.man
1 Account traffic for all hosts in defined network/netmask.
2
3 Features:
4
5 - long (one counter per protocol TCP/UDP/IMCP/Other) and short statistics
6
7 - one iptables rule for all hosts in network/netmask
8
9 - loading/saving counters (by reading/writting to procfs entries)
10
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.
22 .P
23 Example usage:
24
25 account traffic for/to 192.168.0.0/24 network into table mynetwork:
26
27 # iptables -A FORWARD -m account --aname mynetwork --aaddr 192.168.0.0/24
28
29 account traffic for/to WWW serwer for 192.168.0.0/24 network into table mywwwserver:
30
31 # iptables -A INPUT -p tcp --dport 80
32   -m account --aname mywwwserver --aaddr 192.168.0.0/24 --ashort
33
34 # iptables -A OUTPUT -p tcp --sport 80
35   -m account --aname mywwwserver --aaddr 192.168.0.0/24 --ashort
36
37 read counters:
38
39 # cat /proc/net/ipt_account/mynetwork
40 # cat /proc/net/ipt_account/mywwwserver
41
42 set counters:
43
44 # echo "ip = 192.168.0.1 packets_src = 0" > /proc/net/ipt_account/mywwserver
45
46 Webpage:
47   http://www.barbara.eu.org/~quaker/ipt_account/