Skip to contentSkip to conversation

iptables traversing read

LARTC Krystian Antoni 3 participants 3 messages May 19, 2005 – May 20, 2005

lore
Share & tools
lore
#1 lore raw
Quoted 7 lines

Hi

Is there a program which allow me to see how "my" traffic goes through my iptables rules? Which accept it, which deny?
Right now my router has a little bit of traffic and its hard to see only mine traffic.

Quoted 8 lines

--
Mi³ego Dnia
Krystian Antoni
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

The program you will want to use is iptables -nvxL
It will show you byte and packet counters for each rule you have on the system.
With a little bit of shell programming sill, you can get MRTG to work on it and get a visual representation of your traffic, rather than boring text.
This can be done with a script that does a "iptables -nvxL", gets the output, greps for the rule you want to graph, cuts away right to the packet and byte counter, and then returns it.
This script can gbe added as a target in mrtg.conf...mrtg added to crond.conf...and all the graphics are ready!

Google for mrtg...it will be easy!

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#2 lore raw
In reply to Krystian Antoni
Quoted 11 lines · On Fri, May 20, 2005 at 09:52:15AM +0300, [email protected] wrote:
Quoted 5 lines

Hi

Is there a program which allow me to see how "my" traffic goes through my iptables rules? Which accept it, which deny?

The program you will want to use is iptables -nvxL
It will show you byte and packet counters for each rule you have on the system.
With a little bit of shell programming sill, you can get MRTG to work on it and get a visual representation of your traffic, rather than boring text.

With a little bit of shell programming you can store that data into RRD databases. Easy to graph, easy to calculate over time ranges etc.

(Or, maybe, setup MRTG to store stats into RRD bases:)

Signature · 8 lines
  _,-=._              /|_/|
  `-.}   `=._,.-=-._.,  @ @._,
     `._ _,-.   )      _,.-'
        `    G.m-"^m`m'        Dmytro O. Redchuk
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc