Contributed by jose on from the making-blocked-packets-pretty dept.
(Comments are closed)
OpenBSD Journal
Contributed by jose on from the making-blocked-packets-pretty dept.
(Comments are closed)
Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]
By Anonymous Coward () on
By Anonymous Coward () on
By Gunnar Wolf () gwolf@gwolf.cx on http://www.gwolf.cx
By pravus () on
BLOCK udp/139 99%
BLOCK tcp/113 1%
IP's BLOCK'd
x.x.x.x udp/139
y.y.y.y udp/139
...
or whatever. it should be pretty easy to do. just pipe the tcpdump output into awk/sed/perl. but i'm too lazy and i figure someone else has probably done it for me.
Comments
By Anonymous Coward () on
It gathers statistics from tcpdump (or tcpdump logfiles) based on ip, port, protocol, whatever.
By Anonymous Coward () on
By schwack () on
pfctl -sa
shows some passed/dropped stats
Using snort to process /var/log/pflog would also give interesting stats. tcp/udp %'s and more. In addition, snort's output format for displaying headers is much more uniform than tcpdump accross different packet types, making it much easier to awk/sed filter it as you suggested.
By Anonymous Coward () on
Most every utility I've found (snmpd, pf) gathers statistics based only on interface and not by IP address. I currently have pf logging all packets and a cronjob parsing/rotating the log file every 5mins to acheive this...but its quite nasty.
Comments
By Anonymous Coward () on
Trouble is, it is a screen based output, not a logfile based output. Great little program, you can set the refresh time to 600 seconds for a list of the top hosts in 10 minutes.
Comments
By Anonymous Coward () on
Doesn't fit my application.
By Anonymous Coward () on
reading data file /var/log/pfstat:
1027473061 1027472110 0 0 0 0 0 0 0 0 0 0 0 0 0 10355 49 49 12 0 0 0 0 0
1027473121 1027472110 0 0 0 0 0 0 0 0 0 0 0 0 0 11227 49 49 12 0 0 0 0 0
1027473181 1027472110 0 0 0 0 0 0 0 0 0 0 0 0 0 11384 49 49 12 0 0 0 0 0
1027473241 1027472110 0 0 0 0 0 0 0 0 0 0 0 0 4 12039 55 51 12 0 0 0 0 0
1027473301 1027472110 0 0 0 0 0 0 0 0 0 0 0 0 1 12606 56 55 12 0 0 0 0 0
1027473362 1027472110 0 0 0 0 0 0 0 0 0 0 0 0 2 13277 58 56 12 0 0 0 0 0
When I run it I get the following:
generating image file /home/ftp/pub/1hours.jpg
m[0] == 0.000000
m[1] == 0.000000
generating image file /home/ftp/pub/12hours.jpg
m[0] == 0.000000
m[1] == 0.000000
generating image file /home/ftp/pub/day.jpg
m[0] == 0.000000
m[1] == 0.000000
generating image file /home/ftp/pub/month.jpg
m[0] == 0.000000
m[1] == 0.000000
generating image file /home/ftp/pub/week.jpg
m[0] == 0.000000
m[1] == 0.000000
generating image file /home/ftp/pub/year.jpg
m[0] == 0.000000
m[1] == 0.000000
Does m == 0.0000 mean no data?
Comments
By Anonymous Coward () on
Comments
By Anonymous Coward () on
Comments
By Daniel Hartmeier () daniel@benzedrine.cx on http://www.benzedrine.cx/pf.html
By Peter Boosten () pboosten@hotmail.com on mailto:pboosten@hotmail.com
I've downloaded gd-1.8.4, freetype-1.3.1, installed jpeg-6b and png-1.2.1 packages, yet still my compile fails.
Am I forgetting something?
Comments
By Daniel Hartmeier () daniel@benzedrine.cx on http://www.benzedrine.cx/pf.html
What's the compile error?
Comments
By Peter Boosten () pboosten@hotmail.com on mailto:pboosten@hotmail.com
(from memory):
Cannot reference _gdDrawLine
(don't know if this is the exact function, but I got several of them, around 20-30).
I'll try to install gd from ports tonight.
Thnx.
By Bob Dawg () bobdawg@dog.com on mailto:bobdawg@dog.com
Are you going to make an OpenBSD port/package for
this? While reading the man page I saw at the
bottom where it was/will be included in OpenBSD
3.?. I don't see anyway this will get integrated
into the base O/S install due to it's dependency
on GD.
Comments
By Jeffrey () on
By Mastermind () stefan.kaltenbrunner@fh-sbg.ac.at on mailto:stefan.kaltenbrunner@fh-sbg.ac.at
Support for pf-labels would allow graphs for all kinds of different services or IP-ranges an so on.
By Another alternative () on
(not tested by me, btw)
Comments
By Anonymous Coward () on
when you look at the code, it gathers statistic with disabeling and enabeling the firewall.
I don't think this is a good idea.
I dropped it for that.
Comments
By Anonymous Coward () on
i have such a script wich makes
pfctl -s rules -v and didn't find
another way to do it.
And BTW this is not the option to count
the traffic. It gives strange results
with multialiased interfaces.
Comments
By Anonymous Coward () on