ipfcount man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

IPFCOUNT(1)	      User Contributed Perl Documentation	   IPFCOUNT(1)

NAME
       ipfcount - Summarise ipf logs

SYNOPSIS
       ipfcount [-binNopq] [-e expr] -k key[,key...] [-t top] [file...]

DESCRIPTION
       ipfcount summarises ipf(8) logs by counting and sorting the fields.
       The following fields are recognised:

	   iface group rule action shost sport dhost dport proto flags type
	   dir

       By default, all input lines are processed - this can be restricted with
       the -b, -p, -i and -o options to count blocked, passed, incoming and
       outgoing packets respectively.

       The logs can be filtered further with the -e option - see "EXAMPLES".

       At least one sort key must be given using the -k option. ipfcount will
       list all the unique values in this field, from the most to the least
       common.	Repeat this option to create multiple lists, or use comma
       separated keys to create nested lists.

       To list only the first top values in each field, use the -t option.

       If the -n option is given, port numbers and IP addresses are resolved
       in the output. With the -N, option, all input lines are resolved before
       filtering (which may take some time).

       If no files are specified, ipfcount reads from standard input.

OPTIONS
       -b  Count blocked packets

       -i  Count incoming packets

       -n  Lookup host and service names

       -N  Lookup names before filtering

       -o  Count outgoing packets

       -p  Count passed packets

       -q  Don't print headers

       -e expr
	   Filter expression - see "EXAMPLES"

       -k key[,key...]
	   Sort key(s)

       -t top
	   Show only the top top entries

EXAMPLES
       Show the top 10 blocked ports for incoming traffic:

	   ipfcount -bi -k dport -t 10 /var/log/local0

       Show the hosts attempting to connect to those ports:

	   ipfcount -bi -k dport,shost -t 10 /var/log/local0

       Sort incoming connections by interface and protocol:

	   ipfcount -pi -k iface,proto /var/log/local0

       For more sophisticated filtering, use the -e option - it takes a Perl
       expression, using field names as variables.

       (These examples assume that ipmon(8) was invoked without the -n
       option.)

       Show blocked ports above 1024:

	   ipfcount -bi -e 'dport > 1024' -k dport /var/log/local0

       Show traffic leaving the local network:

	   ipfcount -po -e 'dhost !~ /^192\.168/' -k dhost /var/log/local0

       The expression passed to -e can also modify field values. This
       'feature' may occasionally be useful.

       Show the class C network of blocked hosts:

	   ipfcount -bi -e 'shost =~ s/\d+$/0/' -k shost /var/log/local0

       Note that Perl uses different comparison operators for numbers and
       strings - see perlop(1).

SEE ALSO
       ipf(8), ipmon(8), perlop(1)

AUTHOR
       Robert Archer <ipfcount@deathbeforedecaf.net>

perl v5.20.3			  2015-10-07			   IPFCOUNT(1)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net