>are there any recommandationions how to get IP-accounting to work on
>FreeBSD? I have switched from ipf to ipfw so now I need a new way do
>keep track of the IP-traffic passing my machine.
>I have a machine with 30 IP-aliases.
>The least thing I need is monthly summary of the full amount of
>IP-Traffic that passed my (one) NIC. If possible it would be great to
>have it split by the different IPs. Furthermore if some scripts existed
>that could create HTML reports that would be great but not necessary.
>The way ipf and ipacct do the job was pretty cool so if anything similar
>was possible with ipfw or if there existed a tool to do the accounting
>on its own with the desired results I would appreciate it a lot to know.
Add 'count' rules at the top of your IPFW rule list. Per count rule (and
other rules) IPFW tracks the amount of packets matching the rule and the
amount of bytes they total up to. Check the 'ipfw show' output out.
These rules:
#All traffic on public interface
00001 count ip from any to any via tun0
#incoming traffic on public interface for 1 IP
00002 count ip from any to 212.64.31.128 in recv tun0
#outgoing traffic on public interface from 1 IP
00003 count ip from 212.64.31.128 to any out xmit tun0
Produce:
00001 154 25624 count ip from any to any via tun0
00002 2 72 count ip from any to 212.64.31.128 in recv tun0
00003 5 3112 count ip from 212.64.31.128 to any out xmit tun0
There are also command to reset the counters etc. Check the ipfw(8) manpage.
DocWilco
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message