mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-08 21:54:57 +02:00
ACCOUNT: manpage updates
- expand "f.e." - escape dashes where appropriate - fB/fI formatting
This commit is contained in:
@@ -7,10 +7,10 @@ The ACCOUNT is designed to be queried for data every second or at
|
|||||||
least every ten seconds. It is written as kernel module to handle high
|
least every ten seconds. It is written as kernel module to handle high
|
||||||
bandwidths without packet loss.
|
bandwidths without packet loss.
|
||||||
.PP
|
.PP
|
||||||
The largest possible subnet size is 24 bit, meaning f.e. 10.0.0.0/8
|
The largest possible subnet size is 24 bit, meaning for example 10.0.0.0/8
|
||||||
network. ACCOUNT uses fixed internal data structures
|
network. ACCOUNT uses fixed internal data structures
|
||||||
which speeds up the processing of each packet. Furthermore,
|
which speeds up the processing of each packet. Furthermore,
|
||||||
accounting data for one complete 192.168.1.X/24 network takes 4kb of
|
accounting data for one complete 192.168.1.X/24 network takes 4 KB of
|
||||||
memory. Memory for 16 or 24 bit networks is only allocated when
|
memory. Memory for 16 or 24 bit networks is only allocated when
|
||||||
needed.
|
needed.
|
||||||
.PP
|
.PP
|
||||||
@@ -19,7 +19,7 @@ kernel module only transfers information about IPs, where the src/dst
|
|||||||
packet counter is not 0. This saves precious kernel time.
|
packet counter is not 0. This saves precious kernel time.
|
||||||
.PP
|
.PP
|
||||||
There is no /proc interface as it would be too slow for continuous access.
|
There is no /proc interface as it would be too slow for continuous access.
|
||||||
The read&flush query operation is the fastest, as no internal data
|
The read-and-flush query operation is the fastest, as no internal data
|
||||||
snapshot needs to be created&copied for all data. Use the "read"
|
snapshot needs to be created&copied for all data. Use the "read"
|
||||||
operation without flush only for debugging purposes!
|
operation without flush only for debugging purposes!
|
||||||
.PP
|
.PP
|
||||||
@@ -27,46 +27,46 @@ Usage:
|
|||||||
.PP
|
.PP
|
||||||
ACCOUNT takes two mandatory parameters:
|
ACCOUNT takes two mandatory parameters:
|
||||||
.TP
|
.TP
|
||||||
\fB--addr\fR \fInetwork/netmask\fR
|
\fB\-\-addr\fR \fInetwork\fP\fB/\fP\fInetmask\fR
|
||||||
where "network/netmask" is the subnet to account for, in CIDR syntax
|
where \fInetwork\fP\fB/\fP\fInetmask\fP is the subnet to account for, in CIDR syntax
|
||||||
.TP
|
.TP
|
||||||
\fB--tname\fP \fINAME\fP
|
\fB\-\-tname\fP \fINAME\fP
|
||||||
where "NAME" is the name of the table where the accounting information
|
where \fINAME\fP is the name of the table where the accounting information
|
||||||
should be stored
|
should be stored
|
||||||
.PP
|
.PP
|
||||||
Special case is subnet "0.0.0.0/0": all data are then stored in the src_bytes
|
The subnet 0.0.0.0/0 is a special case: all data are then stored in the src_bytes
|
||||||
and src_packets structure of slot "0". This is useful if you want
|
and src_packets structure of slot "0". This is useful if you want
|
||||||
to account the overall traffic to/from your internet provider.
|
to account the overall traffic to/from your internet provider.
|
||||||
.PP
|
.PP
|
||||||
The data can be queried using the userspace libxt_ACCOUNT_cl library,
|
The data can be queried using the userspace libxt_ACCOUNT_cl library,
|
||||||
and by the reference implementation to show usage of this library,
|
and by the reference implementation to show usage of this library,
|
||||||
the "iptaccount" tool, which features following options:
|
the \fBiptaccount\fP(8) tool, which features following options:
|
||||||
.PP
|
.PP
|
||||||
[\fB-u\fP] show kernel handle usage
|
[\fB\-u\fP] show kernel handle usage
|
||||||
.PP
|
.PP
|
||||||
[\fB-h\fP] free all kernel handles (experts only!)
|
[\fB\-h\fP] free all kernel handles (experts only!)
|
||||||
.PP
|
.PP
|
||||||
[\fB-a\fP] list all table names
|
[\fB\-a\fP] list all table names
|
||||||
.PP
|
.PP
|
||||||
[\fB-l name\fP] show data in table \fBname\fP
|
[\fB\-l\fP \fIname\fP] show data in table \fIname\fP
|
||||||
.PP
|
.PP
|
||||||
[\fB-f\fP] flush data after showing
|
[\fB\-f\fP] flush data after showing
|
||||||
.PP
|
.PP
|
||||||
[\fB-c\fP] loop every second (abort with CTRL+C)
|
[\fB\-c\fP] loop every second (abort with CTRL+C)
|
||||||
.PP
|
.PP
|
||||||
Here's an example of use:
|
Here is an example of use:
|
||||||
.PP
|
.PP
|
||||||
iptables -A FORWARD -j ACCOUNT --addr 0.0.0.0/0 --tname all_outgoing
|
iptables \-A FORWARD \-j ACCOUNT \-\-addr 0.0.0.0/0 \-\-tname all_outgoing
|
||||||
iptables -A FORWARD -j ACCOUNT --addr 192.168.1.0/24 --tname sales
|
iptables \-A FORWARD \-j ACCOUNT \-\-addr 192.168.1.0/24 \-\-tname sales
|
||||||
.PP
|
.PP
|
||||||
This creates two tables called "all_outgoing" and "sales" which can be
|
This creates two tables called "all_outgoing" and "sales" which can be
|
||||||
queried using the userspace library/iptaccount tool.
|
queried using the userspace library/iptaccount tool.
|
||||||
.PP
|
.PP
|
||||||
Note that this target is non-terminating - the packet destined to it
|
Note that this target is non-terminating \(em the packet destined to it
|
||||||
will continue traversing the chain in which it has been used.
|
will continue traversing the chain in which it has been used.
|
||||||
.PP
|
.PP
|
||||||
Also note that once a table has been defined for specific CIDR address/netmask
|
Also note that once a table has been defined for specific CIDR address/netmask
|
||||||
block, it can be referenced multiple times using -j ACCOUNT, provided
|
block, it can be referenced multiple times using \-j ACCOUNT, provided
|
||||||
that both the original table name and address/netmask block are specified.
|
that both the original table name and address/netmask block are specified.
|
||||||
.PP
|
.PP
|
||||||
For more information go to http://www.intra2net.com/en/developer/ipt_ACCOUNT/
|
For more information go to http://www.intra2net.com/en/developer/ipt_ACCOUNT/
|
||||||
|
Reference in New Issue
Block a user