Date: Wed, 6 Nov 2002 19:25:42 +0100
From: Sameh Ghane <[EMAIL PROTECTED]>
Subject: Re: [FRnOG] ntop vs iptables

Le (On) Wed, Nov 06, 2002 at 07:42:17PM -0000, Guillaume ecrivit (wrote):
> Bonjour/Bonsoir.
>
> Je reviens sur une question posée il y a quelques semaines à propos de
> l'utilitaire ntop.
> Il m'avait été alors conseillé/suggéré d'utiliser netfilter/iptables pour
> faire de la comptabilité réseau.
>
> Je n'ai pas tilté sur le coup, et peut-être vais-je poser une question
> bête, mais est-il possible (j'entends par là : facillement...) de faire de
> la comptabilité réseau (statistiques de base : nombre de paquets, taille
> des paquets, par protocoles, destination, source etc...) avec
> netfilter/iptables SANS devoir installer cela sur une passerelle ?

Non, tout cela est dans le noyau. Et la souplesse/puissance du truc provenait de
la finesse des règles.

Un petit exemple pour que vous saisissiez l'idée:

# ipfw show
00200 1372995 141506809 count tcp from any to any 22 via xl0
00200 1291186 305811735 count tcp from any 22 to any via xl0
00210 479945360 48774755740 count tcp from any to any 80 via xl0
00210 129804 102683269 count tcp from any 80 to any via xl0
00220 2054730 133193076 count tcp from any 25 to any via xl0
00220 2551105 1777738298 count tcp from any to any 25 via xl0
00230 385742 103467497 count tcp from any 110 to any via xl0
00230 386824 19885279 count tcp from any to any 110 via xl0
00240 188009 161318036 count tcp from any 143 to any via xl0
00240 179639 18259539 count tcp from any to any 143 via xl0
00250 80061 8309065 count tcp from any 3306 to any via xl0
00250 10992 15572978 count tcp from any to any 3306 via xl0
00270 24059 2673696 count tcp from any 6667 to any via xl0
00270 21098 1251492 count tcp from any to any 6667 via xl0
00280 424474 22256921 count tcp from any to any 21 via xl0
00280 4748894 4070906524 count tcp from any to any 20 via xl0
00280 365577 28078327 count tcp from any 21 to any via xl0
00280 4466366 3498350941 count tcp from any 20 to any via xl0
00300 515048573 60745268143 count ip from any to 213.91.4.128/28 via xl0
00300 107678670 89959992782 count ip from 213.91.4.128/28 to any via xl0
00310 645144 96912963 count icmp from any to 213.91.4.128/28 via xl0
00310 163872 68271003 count icmp from 213.91.4.128/28 to any via xl0
00320 507388003 60110723304 count tcp from any to 213.91.4.128/28 via xl0
00320 32542462 29793775140 count tcp from 213.91.4.128/28 to any via xl0
00330 7015255 537620512 count udp from any to 213.91.4.128/28 via xl0
00330 74972319 60097944352 count udp from 213.91.4.128/28 to any via xl0
[ n° |nb de pakts|nb d'octets ]

A partir de ça, mrtg, vos propres applis, ou je ne sais quoi peuvent tout faire,
et vous aurez des chiffres *réels*, pas quelque chose comme ntop.

--
Sameh
----------------------------
Liste de diffusion du FRnOG
http://www.frnog.org/
-----------------------------------------------
Archives :
http://www.frnog.org/archives.php
-----------------------------------------------


Répondre à