233 lines
4.4 KiB
HTML
233 lines
4.4 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>IP Accounting</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
|
|
REL="HOME"
|
|
TITLE="Linux Network Administrators Guide"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="A Sample Firewall Configuration"
|
|
HREF="x-087-2-firewall.example.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Configuring the Kernel for IP Accounting"
|
|
HREF="x-087-2-accounting.kernel.config.html"></HEAD
|
|
><BODY
|
|
CLASS="CHAPTER"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Linux Network Administrators Guide</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-firewall.example.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-accounting.kernel.config.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="CHAPTER"
|
|
><H1
|
|
><A
|
|
NAME="X-087-2-ACCOUNTING"
|
|
>Chapter 10. IP Accounting</A
|
|
></H1
|
|
><DIV
|
|
CLASS="TOC"
|
|
><DL
|
|
><DT
|
|
><B
|
|
>Table of Contents</B
|
|
></DT
|
|
><DT
|
|
>10.1. <A
|
|
HREF="x-087-2-accounting.kernel.config.html"
|
|
>Configuring the Kernel for IP Accounting</A
|
|
></DT
|
|
><DT
|
|
>10.2. <A
|
|
HREF="x-087-2-accounting.ipfwadm.html"
|
|
>Configuring IP Accounting</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>10.2.1. <A
|
|
HREF="x-087-2-accounting.ipfwadm.html#X-087-2-ACCOUNTING.BY.ADDRESS"
|
|
>Accounting by Address</A
|
|
></DT
|
|
><DT
|
|
>10.2.2. <A
|
|
HREF="x-087-2-accounting.ipfwadm.html#X-087-2-ACCOUNTING.BY.SERVICE"
|
|
>Accounting by Service Port</A
|
|
></DT
|
|
><DT
|
|
>10.2.3. <A
|
|
HREF="x-087-2-accounting.ipfwadm.html#X-087-2-ACCOUNTING.OF.ICMP"
|
|
>Accounting of ICMP Datagrams</A
|
|
></DT
|
|
><DT
|
|
>10.2.4. <A
|
|
HREF="x-087-2-accounting.ipfwadm.html#X-087-2-ACCOUNTING.BY.PROTOCOL"
|
|
>Accounting by Protocol</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>10.3. <A
|
|
HREF="x-087-2-accounting.viewing.results.html"
|
|
>Using IP Accounting Results</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>10.3.1. <A
|
|
HREF="x-087-2-accounting.viewing.results.html#AEN9449"
|
|
>Listing Accounting Data with ipfwadm</A
|
|
></DT
|
|
><DT
|
|
>10.3.2. <A
|
|
HREF="x-087-2-accounting.viewing.results.html#AEN9489"
|
|
>Listing Accounting Data with ipchains</A
|
|
></DT
|
|
><DT
|
|
>10.3.3. <A
|
|
HREF="x-087-2-accounting.viewing.results.html#AEN9506"
|
|
>Listing Accounting Data with iptables</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>10.4. <A
|
|
HREF="x-087-2-accounting.zeroing.counter.html"
|
|
>Resetting the Counters</A
|
|
></DT
|
|
><DT
|
|
>10.5. <A
|
|
HREF="x-087-2-accounting.flushing.rules.html"
|
|
>Flushing the Ruleset</A
|
|
></DT
|
|
><DT
|
|
>10.6. <A
|
|
HREF="x-087-2-accounting.passive.collection.html"
|
|
>Passive Collection of Accounting Data</A
|
|
></DT
|
|
></DL
|
|
></DIV
|
|
><P
|
|
> In today’s world of commercial Internet service, it is becoming
|
|
increasingly important to know
|
|
how much data you are transmitting and receiving on your network connections.
|
|
If you are an Internet Service Provider and you charge your customers by
|
|
volume, this will be essential to your business. If you are a customer
|
|
of an Internet Service Provider that charges by data volume, you will
|
|
find it useful to collect your own data to ensure the accuracy of your
|
|
Internet charges.</P
|
|
><P
|
|
>There are other uses for network accounting that have nothing to do with
|
|
dollars and bills. If you manage a server that offers a number of different
|
|
types of network services, it might be useful to you to know exactly
|
|
how much data is being generated by each one. This sort of information
|
|
could assist you in making decisions, such as what hardware to buy or how
|
|
many servers to run.</P
|
|
><P
|
|
>The Linux kernel provides a facility that allows you to collect all sorts
|
|
of useful information about the network traffic it sees. This facility
|
|
is called <I
|
|
CLASS="EMPHASIS"
|
|
>IP accounting</I
|
|
>.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-firewall.example.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-accounting.kernel.config.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>A Sample Firewall Configuration</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Configuring the Kernel for IP Accounting</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |