[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Firewall Display App



for the log part i hacked mysel a perl script that i tail the syslog to:

#!/usr/bin/perl
$~ = LINE;
while (<>) {
  $line = $_;
  if ($line =~ /fp=/) {
    @fields = split(" ", $line);
    $t = $fields[2];
    foreach $f (@fields) {
	if ($f =~ /SRC=(.*)/) {$s = $1;}
	if ($f =~ /DST=(.*)/) {$d = $1;}
	if ($f =~ /SPT=(.*)/) {$sp = $1;}
	if ($f =~ /DPT=(.*)/) {$dp = $1;}
	if ($f =~ /PROTO=(.*)/) {$p = $1;}
    }
    write;
  }
}
format LINE =
@<<<<<<< @<<<<<<<<<<<<<<<<:@<<<< -> @<<<<<<<<<<<<<<<<:@<<<< @<<<
$t,$s,$sp,$d,$dp,$p
.

yeah, i know, could probably be written in one line, but i like to
understand it later...

any improvements appreciated...

bye
fabian

On Wed, 2002-01-09 at 00:15, Thomas Cook wrote:
> Ok, I have a firewall box with a monitor, and I want to display firewall
> statistics and such on the monitor while the firewall is up.  Nothing fancy
> or X involved, just maybe number of packets, collisions, loss and choke, CPU
> and memory usage, log read outs, that sort of thing.
> 
> I though about just running the firewall logs across the screen, but this
> is, well...boring and unimpressive.
> 
> Does anyone know a good app or script for this?
> 
> -Tom
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-firewall-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
> 




Reply to: