mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-14 13:47:07 +02:00
fixed quotes, add CVS Id
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@990 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
0152a59fc8
commit
9feb0d8e1d
@ -2,6 +2,8 @@
|
|||||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
<article>
|
<article>
|
||||||
|
<!--$Id$-->
|
||||||
|
|
||||||
<articleinfo>
|
<articleinfo>
|
||||||
<title>Shorewall Traffic Accounting</title>
|
<title>Shorewall Traffic Accounting</title>
|
||||||
|
|
||||||
@ -26,8 +28,8 @@
|
|||||||
document under the terms of the GNU Free Documentation License, Version
|
document under the terms of the GNU Free Documentation License, Version
|
||||||
1.2 or any later version published by the Free Software Foundation; with
|
1.2 or any later version published by the Free Software Foundation; with
|
||||||
no Invariant Sections, with no Front-Cover, and with no Back-Cover
|
no Invariant Sections, with no Front-Cover, and with no Back-Cover
|
||||||
Texts. A copy of the license is included in the section entitled "<ulink
|
Texts. A copy of the license is included in the section entitled
|
||||||
url="GnuCopyright.htm">GNU Free Documentation License</ulink>".</para>
|
<quote><ulink url="GnuCopyright.htm">GNU Free Documentation License</ulink></quote>.</para>
|
||||||
</legalnotice>
|
</legalnotice>
|
||||||
</articleinfo>
|
</articleinfo>
|
||||||
|
|
||||||
@ -36,13 +38,14 @@
|
|||||||
|
|
||||||
<para>Shorewall accounting rules are described in the file
|
<para>Shorewall accounting rules are described in the file
|
||||||
/etc/shorewall/accounting. By default, the accounting rules are placed in a
|
/etc/shorewall/accounting. By default, the accounting rules are placed in a
|
||||||
chain called "accounting" and can thus be displayed using
|
chain called <quote>accounting</quote> and can thus be displayed using
|
||||||
"shorewall show accounting". All traffic passing into, out of or
|
<quote>shorewall show accounting</quote>. All traffic passing into, out of
|
||||||
through the firewall traverses the accounting chain including traffic that
|
or through the firewall traverses the accounting chain including traffic
|
||||||
will later be rejected by interface options such as "tcpflags" and
|
that will later be rejected by interface options such as <quote>tcpflags</quote>
|
||||||
"maclist". If your kernel doesn't support the connection
|
and <quote>maclist</quote>. If your kernel doesn't support the
|
||||||
tracking match extension (Kernel 2.4.21) then some traffic rejected under
|
connection tracking match extension (Kernel 2.4.21) then some traffic
|
||||||
'norfc1918' will not traverse the accounting chain.</para>
|
rejected under <quote>norfc1918</quote> will not traverse the accounting
|
||||||
|
chain.</para>
|
||||||
|
|
||||||
<para>The columns in the accounting file are as follows:</para>
|
<para>The columns in the accounting file are as follows:</para>
|
||||||
|
|
||||||
@ -54,75 +57,75 @@
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>COUNT- Simply count the match and continue trying to match the
|
<para>COUNT- Simply count the match and continue trying to match the
|
||||||
packet with the following accounting rules </para>
|
packet with the following accounting rules</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>DONE- Count the match and don't attempt to match any
|
<para>DONE- Count the match and don't attempt to match any
|
||||||
following accounting rules. </para>
|
following accounting rules.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para><emphasis><chain></emphasis> - The name of a chain to
|
<para><emphasis><chain></emphasis> - The name of a chain to
|
||||||
jump to. Shorewall will create the chain automatically. If the name
|
jump to. Shorewall will create the chain automatically. If the name
|
||||||
of the chain is followed by ":COUNT" then a COUNT rule
|
of the chain is followed by <quote>:COUNT</quote> then a COUNT rule
|
||||||
matching this rule will automatically be added to <chain>.
|
matching this rule will automatically be added to <chain>.
|
||||||
Chain names must start with a letter, must be composed of letters
|
Chain names must start with a letter, must be composed of letters
|
||||||
and digits, and may contain underscores ("_") and periods
|
and digits, and may contain underscores (<quote>_</quote>) and
|
||||||
("."). Beginning with Shorewall version 1.4.8, chain names
|
periods (<quote>.</quote>). Beginning with Shorewall version 1.4.8,
|
||||||
man also contain embedded dashes ("-") and are not required
|
chain names man also contain embedded dashes (<quote>-</quote>) and
|
||||||
to start with a letter.</para>
|
are not required to start with a letter.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para><emphasis role="bold">CHAIN</emphasis> - The name of the chain
|
<para><emphasis role="bold">CHAIN</emphasis> - The name of the chain
|
||||||
where the accounting rule is to be added. If empty or "-" then
|
where the accounting rule is to be added. If empty or <quote>-</quote>
|
||||||
the "accounting" chain is assumed.</para>
|
then the <quote>accounting</quote> chain is assumed.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para><emphasis role="bold">SOURCE</emphasis> - Packet Source. The name
|
<para><emphasis role="bold">SOURCE</emphasis> - Packet Source. The name
|
||||||
of an interface, an address (host or net) or an interface name followed
|
of an interface, an address (host or net) or an interface name followed
|
||||||
by ":" and a host or net address.</para>
|
by <quote>:</quote> and a host or net address.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para><emphasis role="bold">DESTINATION</emphasis> - Packet Destination
|
<para><emphasis role="bold">DESTINATION</emphasis> - Packet Destination
|
||||||
Format the same as the SOURCE column. </para>
|
Format the same as the SOURCE column.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para><emphasis role="bold">PROTOCOL</emphasis> - A protocol name (from
|
<para><emphasis role="bold">PROTOCOL</emphasis> - A protocol name (from
|
||||||
/etc/protocols) or a protocol number. </para>
|
/etc/protocols) or a protocol number.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para><emphasis role="bold">DEST PORT</emphasis> - Destination Port
|
<para><emphasis role="bold">DEST PORT</emphasis> - Destination Port
|
||||||
number. Service name from /etc/services or port number. May only be
|
number. Service name from /etc/services or port number. May only be
|
||||||
specified if the protocol is TCP or UDP (6 or 17). </para>
|
specified if the protocol is TCP or UDP (6 or 17).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para> <emphasis role="bold">SOURCE PORT</emphasis>- Source Port number.
|
<para><emphasis role="bold">SOURCE PORT</emphasis>- Source Port number.
|
||||||
Service name from /etc/services or port number. May only be specified if
|
Service name from /etc/services or port number. May only be specified if
|
||||||
the protocol is TCP or UDP (6 or 17).</para>
|
the protocol is TCP or UDP (6 or 17).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>In all columns except ACTION and CHAIN, the values
|
<para>In all columns except ACTION and CHAIN, the values <quote>-</quote>,<quote>any</quote>
|
||||||
"-","any" and "all" are treated as wild-cards.</para>
|
and <quote>all</quote> are treated as wild-cards.</para>
|
||||||
|
|
||||||
<para>The accounting rules are evaluated in the Netfilter 'filter'
|
<para>The accounting rules are evaluated in the Netfilter <quote>filter</quote>
|
||||||
table. This is the same environment where the 'rules' file rules are
|
table. This is the same environment where the <quote>rules</quote> file
|
||||||
evaluated and in this environment, DNAT has already occurred in inbound
|
rules are evaluated and in this environment, DNAT has already occurred in
|
||||||
packets and SNAT has not yet occurred on outbound ones.</para>
|
inbound packets and SNAT has not yet occurred on outbound ones.</para>
|
||||||
|
|
||||||
<para>Accounting rules are not stateful -- each rule only handles traffic in
|
<para>Accounting rules are not stateful -- each rule only handles traffic in
|
||||||
one direction. For example, if eth0 is your internet interface and you have
|
one direction. For example, if eth0 is your internet interface and you have
|
||||||
a web server in your DMZ connected to eth1 then to count HTTP traffic in
|
a web server in your DMZ connected to eth1 then to count HTTP traffic in
|
||||||
both directions requires two rules: </para>
|
both directions requires two rules:</para>
|
||||||
|
|
||||||
<programlisting> #ACTION CHAIN SOURCE DESTINATION PROTOCOL DEST SOURCE
|
<programlisting> #ACTION CHAIN SOURCE DESTINATION PROTOCOL DEST SOURCE
|
||||||
# PORT PORT
|
# PORT PORT
|
||||||
@ -140,8 +143,8 @@
|
|||||||
web:COUNT - eth1 eth0 tcp - 443
|
web:COUNT - eth1 eth0 tcp - 443
|
||||||
DONE web</programlisting>
|
DONE web</programlisting>
|
||||||
|
|
||||||
<para>Now "shorewall show web" will give you a breakdown of your web
|
<para>Now <quote>shorewall show web</quote> will give you a breakdown of
|
||||||
traffic:</para>
|
your web traffic:</para>
|
||||||
|
|
||||||
<programlisting> [root@gateway shorewall]# shorewall show web
|
<programlisting> [root@gateway shorewall]# shorewall show web
|
||||||
Shorewall-1.4.6-20030821 Chain web at gateway.shorewall.net - Wed Aug 20 09:48:56 PDT 2003
|
Shorewall-1.4.6-20030821 Chain web at gateway.shorewall.net - Wed Aug 20 09:48:56 PDT 2003
|
||||||
@ -168,8 +171,8 @@
|
|||||||
COUNT web eth0 eth1
|
COUNT web eth0 eth1
|
||||||
COUNT web eth1 eth0</programlisting>
|
COUNT web eth1 eth0</programlisting>
|
||||||
|
|
||||||
<para>Now "shorewall show web" simply gives you a breakdown by input
|
<para>Now <quote>shorewall show web</quote> simply gives you a breakdown by
|
||||||
and output:</para>
|
input and output:</para>
|
||||||
|
|
||||||
<programlisting> [root@gateway shorewall]# shorewall show accounting web
|
<programlisting> [root@gateway shorewall]# shorewall show accounting web
|
||||||
Shorewall-1.4.6-20030821 Chains accounting web at gateway.shorewall.net - Wed Aug 20 10:27:21 PDT 2003
|
Shorewall-1.4.6-20030821 Chains accounting web at gateway.shorewall.net - Wed Aug 20 10:27:21 PDT 2003
|
||||||
|
Loading…
x
Reference in New Issue
Block a user