[plug] Track traffic on an aliased interface

bwarff bwarff at obsidian.com.au
Thu Dec 16 12:11:36 WST 2004


once you have made the correct changes, the command "iptables-save" will dump the 
current iptables configuration to stdout,redirect this to overwrite the current bootup config (distro dependant)
eg: 
	iptables-save > /path/to/current/iptables

on a fedora/redhat machine this path is /etc/sysconfig/iptables



On Thu, 16 Dec 2004 14:02:03 +1100
Onno Benschop <onno at itmaze.com.au> wrote:

> > Could you use some basic iptables rules to log traffic to/from the
> > aliased addresses?  Then you can see the counts with "iptables -vL" 
> > they don't wrap at ~2GB either!  I once did this to certain traffic on a
> > wireless gateway with far too many aliased interfaces (read dodgy
> > router) many moons ago, worked well for me.
> > 
> > If you already have a firewall setup it is already counting, just add a
> > few more specific rules.  If the box has no firewall and is already set
> > to allow everything, you can just make rules allowing what you want to
> > count and that should do it.
> > 
> > If you then wanted to graph it, some simple shell magic of the iptables
> > -vL output called from mrtg will work fine.
> 
> Whoot!
> 
> Ok, does this keep over a shut-down, or do I need to log it also :-)
> 
> Cheers,
> 
> Onno Benschop 
> 
> Connected via Optus B3 at S34°33'15" - E150°21'57" (Moss Vale, NSW)
> -- 
> ()/)/)()        ..ASCII for Onno.. 
> |>>?            ..EBCDIC for Onno.. 
> --- -. -. ---   ..Morse for Onno.. 
> 
> Proudly supported by Skipper Trucks, Highway1, Concept AV, Sony Central, Dalcon
> ITmaze - ABN: 56 178 057 063 - ph: 04 1219 8888 - onno at itmaze dot com dot au
> 
> _______________________________________________
> PLUG discussion list: plug at plug.linux.org.au
> http://spark.plug.linux.org.au/cgi-bin/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au



More information about the plug mailing list