/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */
Jon Etkins <[EMAIL PROTECTED]> wrote:
>
> >Create output rules which trigger on a per-interface basis, and which
> >contain no target. They will thus collect traffic statistics, but
> >not affect the firewall/masq in any way.
>
> Thanks for the suggestion, Fuzzy. How would I do this with ipportfw
> and ipfwadm (I'm running RH-2.0.36)?
Well, ipchains combines the firewalling with the packet/byte counts;
every rule counts how much traffic matches it. But in the older ipfwadm
interface, there is a special ruleset, the Accounting ruleset, that is
used to keep counts of matching packets.
What you do is construct a rule (or set of rules) that match the types
of traffic you're looking for, and add them to the accounting ruleset
via -A. Since I've lost the original message describing the type of
traffic you're looking for, I can't give you specific examples, but
here's a general example:
ipfwadm -A both -a -S 192.168.1.0/24 -D 0/0
This rule counts how many packets have a source-IP of 192.168.1.*.
ipfwadm -A -l -n
This lists the rules, and the traffic that they have counted. If you
also add the -z switch, the traffic counters will be zero'd out, after
showing them to you, so that you can write a script that will count
daily traffic, or hourly, or somesuch.
--
[EMAIL PROTECTED] (Fuzzy Fox) || "Just about every computer on the market
sometimes known as David DeSimone || today runs Unix, except the Mac (and
http://www.dallas.net/~fox/ || nobody cares about it). -- Bill Joy '85
_______________________________________________
Masq maillist - [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ -- THIS INCLUDES
UNSUBSCRIBING!
or email to [EMAIL PROTECTED]
PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.