freebsd-skq/contrib/ipfilter
brooks 5c7716ee9f This commit was generated by cvs2svn to compensate for changes in r123109,
which included commits to RCS files with non-trunk default branches.
2003-12-02 18:33:36 +00:00
..
BSD Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
etc Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
FreeBSD Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
FreeBSD-2.2 Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
FreeBSD-3 Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
FreeBSD-4.0 Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
FWTK
iplang bring changes in IPFilter to 3.4.31 on to the head 2003-02-15 06:32:48 +00:00
ipsd
ipsend bring changes in IPFilter to 3.4.31 on to the head 2003-02-15 06:32:48 +00:00
l4check Import IPFilter 3.4.26 2002-04-25 03:34:26 +00:00
man update man page to reflect change in default syslog level ipmon is now compiled with 2003-04-05 21:12:58 +00:00
perl
rules With a bit of luck, this will be a first-time right import of ipfilter 3.4.29 2002-08-28 13:42:48 +00:00
samples Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
test Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
BNF Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
bpf.h Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
bsdinstall
BugReport
common.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
facpri.c
facpri.h
FAQ.FreeBSD
fils.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
HISTORY Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
IMPORTANT
inet_addr.c Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
INST.FreeBSD-2.2
INSTALL.FreeBSD Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
INSTALL.xBSD
ip_lfil.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ip_sfil.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ipf.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ipf.h Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
IPF.KANJI
IPFILTER.LICENCE Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
ipfs.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ipft_ef.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ipft_hx.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ipft_pc.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ipft_sn.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ipft_td.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ipft_tx.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ipmon.c bring changes in IPFilter to 3.4.31 on to the head 2003-02-15 06:32:48 +00:00
ipnat.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
ipt.c This is a direct commit to the vendor branch with code from the vendor. 2003-12-02 18:33:36 +00:00
ipt.h
kmem.c This is a direct commit to the vendor branch with code from the vendor. 2003-12-02 18:33:36 +00:00
kmem.h Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
LICENCE
Makefile Change the default syslog facility from LOG_LOCAL0 to LOG_SECURITY after 2003-04-05 09:25:19 +00:00
misc.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
mkfilters
ml_ipl.c
mlf_ipl.c Import IPFilter 3.4.28 2002-06-07 08:58:22 +00:00
mli_ipl.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
mln_ipl.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
mls_ipl.c Import IPFilter 3.4.26 2002-04-25 03:34:26 +00:00
NAT.FreeBSD
natparse.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
opt_inet6.h
opt.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
parse.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
pcap.h
printnat.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
printstate.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
QNX_OCL.txt Import IPFilter 3.4.26 2002-04-25 03:34:27 +00:00
README
relay.c Import userland tools for IPFilter 3.4.31 into -current 2003-02-15 06:27:40 +00:00
snoop.h
solaris.c Import IPFilter 3.4.26 2002-04-25 03:34:26 +00:00
todo Import IPFilter 3.4.25 2002-03-19 11:45:20 +00:00
UPGRADE_NOTICE
Y2K

IP Filter - What's this about ?
============================

  The idea behind this package is allow those who use Unix workstations as
routers (a common occurance in Universities it appears) to apply packet
filtering to packets going in and out of them.  This package has been
tested on all versions of SunOS 4.1 and Solaris 2.4/2.5, running on Sparcs.
It is also quite possible for this small kernel extension to be installed
and used effectively on Sun workstations which don't route IP, just for
added security.  It can also be integrated with the multicast patches.
It has also been tested successfully on all of the modern free BSDs as
well as BSDI, and SGI's IRIX 6.2.

   The filter keeps a rule list for both inbound and outbound sides of
the IP packet queue and a check is made as early as possible, aiming to
stop the packet before it even gets as far as being checked for source
route options.  In the file "BNF", a set of rules for constructing filter
rules understood by this package is given.  The files in the directory
"rules", "example.1" ... "example.sr" show example rules you might apply.

   In practise, I've successfully isolated a workstation from all
machines except the NFS file servers on its local subnets (yeah, ok, so
this doesn't really increase security, because of NFS, but you get the
drift on how it can be applied and used).  I've also successfully
setup and maintained my own firewalls using it with TIS's Firewall Toolkit,
including using it on an mbone router.

   When using it with multicast IP, the calls to fr_check() should be
before the packet is unwrapped and after it is encapsulated.  So the
filter routines will see the packet as a UDP packet, protocol XYZ.
Whether this is better or worse than having it filter on class D addresses
is debateable, but the idea behind this package is to be able to
discriminate between packets as they are on the 'wire', before they
get routed anywhere, etc.

   It is worth noting, that it is possible, using a small MTU and
generating tiny fragmented IP packets to generate a TCP packet which
doesn't contain enough information to filter on the "flags".  Filtering
on these types of packets is possible, but under the more general case
of the packets being "short".  ICMP and UDP packets which are too small
(they don't contain a complete header) are dropped and logged, no questions
asked.  When filtering on fragmented packets, the last fragment will get
through for TCP/UDP/ICMP packets.

Bugs/Problems
-------------
If you have a problem with IP Filter on your operating system, please email
a copy of the file "BugReport" with the details of your setup as required
and email to darrenr@pobox.com.

Some general notes.
-------------------
   To add/delete a rule from memory, access to the device in /dev is needed,
allowing non-root maintenaince.  The filter list in kernel memory is built
from the kernel's heap.  Each packet coming *in* or *out* is checked against
the appropriate list, rejects dropped, others passed through.  Thus this will
work on an individual host, not just gateways.  Presently there is only one
list for all interfaces, the changes required to make it a per-interface list
require more .o replacements for the kernel.  When checking a packet, the
packet is compared to the entire list from top to bottom, the last matching
line being effective.


What does what ?
----------------
if_fil.o  (Loadable kernel module)
	- additional kernel routines to check an access list as to whether
	  or not to drop or pass a packet.  It currently defaults to pass
	  on all packets.

ipfstat
	- digs through your kernel (need to check #define VMUNIX in fils.c)
	  and /dev/kmem for the access filter list and mini stats table.
	  Obviously needs to be run priviledged if required.

ipf
	- reads the files passed as parameters as input files containing new
	  filter rules to add/delete to the kernel list.  The lines are
	  inserted in order; the first line is inserted first, and ends up
	  first on the list.  Subsequent invocations append to the list
	  unless specified otherwise.

ipftest
	- test the ruleset given by filename.  Reads in the ruleset and then
	  waits for stdin.

	  See the man pages (ipf.1, ipftest.1, ipfstat.8) for more detailed
	  information on what the above do.

mkfilters
	- suggests a set of filter rules to employ and suggests how to add
	  routes to back these up.

BNF
	- BNF rule set for the filter rules

Darren Reed
darrenr@pobox.com