Personal blog, accepting guest commentary and links to things of interest.

March 4, 2005

Using GraphDefang to chart iptables drops

by @ 11:15 pm. Filed under Security

Thanks to Jason for his help, in the end the gshield config was almost exactly what we needed.

[code]
#!/usr/bin/perl -w

# Feb 25 13:40:30 bashful kernel: firewall: IN=eth0 OUT= MAC=00:0e:b6:69:a8:c7:12:54:4f:dc:b4:1c:08:00
SRC=64.124.2.53 DST=61.1.1.1 LEN=48 TOS=0×00 PREC=0×00 TTL=115 ID=11556 DF PROTO=TCP SPT=2213 DPT=135
WINDOW=8760 RES=0×00 SYN URGP=0

$event{’kernel’}{’iptables’} =
sub {
if ($text =~ m/^firewall: .* SRC=(\S+) DST=(\S+) .* DPT=(\d+)/) {
if ($unixtime > $MaxDBUnixTime) {
my $src = $1;
my $dst = $2;
my $dpt = $3;

$event = ‘iptables’;
$sender = $src;
$recipient = $dst;
$value1 = $dpt;

$FoundNewRow = 1;
}
}
};
[/code]
And an example:

internal links:

Aquarium

    PH = 8.01
    AirTemp = 74.00
    TankTemp = 78.4
    ORP = 437

Google Ads:

categories:

search blog:

archives:

March 2005
M T W T F S S
« Feb   Sep »
 123456
78910111213
14151617181920
21222324252627
28293031  

other:

  • RSS 2.0
  • Comments RSS 2.0
  • Valid RSS
  • Valid XHTML
  • XFN
  • Theme copyright © 2002–2008 Mike Little.

FlickrRss: "watchmen"

    DeathGob Badges

    Watchpeanuts

    I found Rorschach!

    SOMEBODY

    IMG_3915

20 queries. 1.524 seconds