| Rev | Author | # | Line |
|---|---|---|---|
| 4 | JohnMcPherson | 1 | ipac is a package which is designed to gather, summarize and nicely |
| 2 | output the __IP ac__counting data. ipac make summaries and graphs as ascii | ||
| 3 | text and/or gif images with graphs. | ||
| 4 | |||
| 5 | ipac... | ||
| 6 | * is for Linux | ||
| 7 | * runs on top of the ipfwadm or ipchains tool | ||
| 8 | * needs certain kernel parts compiled in | ||
| 5 | CraigBox | 9 | * only supports ipchains based kernels (it has a big brother for iptables called ipac-ng which is close enough) |
| 4 | JohnMcPherson | 10 | |
| 11 | Note: linux kernel 2.2 used ipchains, 2.4 uses iptables. | ||
| 12 | |||
| 9 | CraigBox | 13 | !HOW DOES IT WORK? |
| 4 | JohnMcPherson | 14 | |
| 6 | CraigBox | 15 | ipac consists of two scripts (shell and perl) and one C program: |
| 4 | JohnMcPherson | 16 | |
| 6 | CraigBox | 17 | * ipacset reads a configuration file and sets up ip accounting for the kernel using ipfwadm or ipchains |
| 4 | JohnMcPherson | 18 | |
| 9 | CraigBox | 19 | * fetchipac, executed from cron once in a while, reads the current ip accounting data assembled by the kernel and writes it to a new file |
| 4 | JohnMcPherson | 20 | |
| 6 | CraigBox | 21 | * ipacsum(8) summarizes the data from a set of files and, optionally, replaces these files by one. It displays the values as a simple table containing the sums, as png graph pictures or as ascii graph pictures. |
| 4 | JohnMcPherson | 22 | |
| 6 | CraigBox | 23 | ---- |
| 24 | !ipac rules | ||
| 4 | JohnMcPherson | 25 | |
| 6 | CraigBox | 26 | If you're running debian, the config file format is slightly different to newer versions. You don't have ipac~in/out/fwin etc, you just have 'in' and 'out', and both in and out get called on the forward chain. |
| 27 | |||
| 28 | If you're running ipac on a machine that is a gateway between two networks, you will find that your totals are largely irrelevant because if I download 2Mb of stuff, I will get 2Mb in on the external interface and then 2Mb out on the internal interface. | ||
| 29 | |||
| 8 | PerryLorier | 30 | The easiest way around this is to simply monitor your external interface. You really don't care about internal traffic because it's all free. |
| 6 | CraigBox | 31 | |
| 32 | Edit /etc/ipac-ng/ipac.conf and replace the +'s with 'eth1' or 'ppp0' etc. | ||
| 5 | CraigBox | 33 | |
| 34 | ---- | ||
| 35 | |||
| 36 | !Graphing ipac | ||
| 37 | |||
| 6 | CraigBox | 38 | The manual page for ipacsum(8). |
| 39 | |||
| 40 | Start with something simple like this: | ||
| 41 | |||
| 7 | CraigBox | 42 | # ipacsum --png /home/crb/public_html --png-average-curve 15 --png-index index.html \ |
| 43 | --png-caption-in-index --png-width 695 -s 24h | ||
| 5 | CraigBox | 44 | |
| 45 | Perhaps you'd rather use [MRTG]? See http://www.saas.nsw.edu.au/solutions/ipac-2-mrtg.html. | ||
| 4 | JohnMcPherson | 46 | |
| 47 | ---- | ||
| 48 | Part of [CategoryNetworking] |
lib/blame.php:177: Warning: Invalid argument supplied for foreach()