Try this:
# Flush all old rules
/sbin/ipfwadm -Af
# Traffic accounting from network 194.102.58.0/255.255.255.0 to hostname
# All protocols, counting bytes/packets from eth4
/sbin/ipfwadm -Aa -W eth4 -P all -S 194.102.58.0/24 -D hostname/32
# Traffic accounting from to 194.102.58.0/255.255.255.0 from hostname
# All protocols, counting bytes/packets from eth4
/sbin/ipfwadm -Aa -W eth4 -P all -D 194.102.58.0/24 -S hostname/32
# Traffic accounting from world to hostname
# All protocols, interface auto-determinated from routing table
/sbin/ipfwadm -Aa -P all -S 0/0 -D hostname/32
# Traffic accounting to world from hostname
# All protocols, interface auto-determinated from routing table
/sbin/ipfwadm -Aa -P all -D 0/0 -S hostname/32
The same is posible for a network to/from world, also it could be
detailed on protocol families using multiple rules with -P tcp or udp or
icmp
After all is set a cron job that do:
date >> /var/log/traffic
ipfwadm >> /var/log/traffic
and a some little perl scripts could give you a fuul accounting.
At last you could allways search http://freshmeat.net after ipac
package and his friends who do what you want and more ;)
HTH Mircea C.
"ing.Bubulac Angela Tatiana" wrote:
>
> hello,
> I read the ipfwman and some of FAQs but it seems that it is not enough.
> where did I wrote something wrong?
> This is my rc.ipfwadm file.
> # lets get all packets for the host
> /sbin/ipfwadm -A in -a -W eth4 -P all -S 194.102.58.0/255.255.255.0 -D
> luna1a
> /sbin/ipfwadm -A out -a -W eth4 -P all -S 194.102.58.0/255.255.255.0 -D
> luna1b
>
> /sbin/ipfwadm -A in -a -W eth4 -P all -S 194.102.59.0/255.255.255.0 -D
> luna2a
> /sbin/ipfwadm -A out -a -W eth4 -P all -S 194.102.59.0/255.255.255.0 -D
> luna2b
>
> /sbin/ipfwadm -A in -a -W eth4 -P all -S 194.102.60.128/255.255.255.192 -D
> luna3a
> /sbin/ipfwadm -A out -a -W eth4 -P all -S 194.102.60.128/255.255.255.192
> -D luna3b
>
> /sbin/ipfwadm -A in -a -W eth4 -P all -S 194.102.38.128/255.255.255.192 -D
> luna5a
> /sbin/ipfwadm -A out -a -W eth4 -P all -S 194.102.38.128/255.255.255.192
> -D luna5b
>
> /sbin/ipfwadm -A in -a -W eth4 -P all -S 193.231.157.0/255.255.255.0 -D
> luna6a
> /sbin/ipfwadm -A out -a -W eth4 -P all -S 193.231.157.0/255.255.255.0 -D
> luna6b
>
> /sbin/ipfwadm -A in -a -P all -S 193.231.44.0/255.255.255.0 -D 0.0.0.0/0
> /sbin/ipfwadm -A out -a -P all -S 193.231.44.0/255.255.255.0 -D 0.0.0.0/0
>
> TIA.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]