[mrtg] Re: Real IP and IP alias

Gary W. Smith gary at primeexalia.com
Mon Nov 6 18:09:01 MET 2006


As mentioned in the prior post, Linux only keeps stats on the primary.
We ran into this problem as we wanted to keep track of all traffic going
through the firewall on a couple class C networks.

Here is basically what we did.  We added a couple IP table rules (broken
down by IP or segment, however you like) with a change of FWIN and
FWOUT.  Anything coming in the firewall from the outside would hit the
FWIN and anything going out the firewall would hit FWOUT.  Both chains
had no rules per say but they did keep track of the byes and packets
transferred in and out.

Then we had a cronjob that would dump the data using iptables into a
test file and grep from FWIN and FWOUT.  From there we had MTRG read the
saved files created by the cronjob using a simple shell script.

It sound's complex but it's not really and it's fairly reliable.  Since
you are using an incrementing counter even if you restart the box or
reset the counters on iptables you only loose a single interval.

Hope that helps, 

Gary Wayne Smith

> -----Original Message-----
> From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch]
On
> Behalf Of Lists
> Sent: Monday, November 06, 2006 7:21 AM
> To: mrtg at list.ee.ethz.ch
> Subject: [mrtg] Real IP and IP alias
> 
> Hello,
> 
> i poll a Firewall's Snmp by MRTG to see wan interface traffic and lan
> interface traffic.
> 
> That Firewall, on the eth0 WAN interface, has got two IP: the first is
the
> real IP and the second is an alias IP, eth0:0.
> 
> When i run the cfgmaker, it discover only the alias ip on the
interface,
> and
> this IP is not interesting for me for statistics; i would like to make
> cfgmake see the real IP in that interface.
> 
> How can i workaround the problem?
> Thank you, regards!
> 
> Francesco (from Italy)
> 
> 
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://lists.ee.ethz.ch/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi
> 
> 
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://lists.ee.ethz.ch/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the mrtg mailing list