• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

BSD/26-Jul-2015-1,2971,070

FWTK/26-Jul-2015-2,1161,900

FreeBSD/26-Jul-2015-520480

FreeBSD-2.2/26-Jul-2015-370336

FreeBSD-3/26-Jul-2015-126104

FreeBSD-4.0/26-Jul-2015-372322

etc/26-Jul-2015-2,6422,640

iplang/26-Jul-2015-2,3561,953

ipsd/26-Jul-2015-1,7791,354

ipsend/26-Jul-2015-8,0306,489

l4check/26-Jul-2015-872737

lib/26-Jul-2015-7,6325,516

man/26-Jul-2015-3,3263,193

net/26-Jul-2015-

perl/26-Jul-2015-4,5683,710

rules/26-Jul-2015-730485

samples/26-Jul-2015-603494

test/26-Jul-2015-11,33710,201

tools/26-Jul-2015-15,33213,010

BNFD26-Jul-20153.5 KiB8274

BugReportD26-Jul-2015409 1310

FAQ.FreeBSDD26-Jul-20152.8 KiB10568

HISTORYD26-Jul-201567.3 KiB2,3081,334

IMPORTANTD26-Jul-2015303 129

INST.FreeBSD-2.2D26-Jul-20151.9 KiB6342

INSTALL.FreeBSDD26-Jul-20151.4 KiB5739

INSTALL.xBSDD26-Jul-20151.2 KiB4629

IPF.KANJID26-Jul-201519.4 KiB

LICENCED26-Jul-2015612 1716

MakefileD26-Jul-201514.5 KiB411267

NAT.FreeBSDD26-Jul-20152.8 KiB10568

READMED26-Jul-20154.5 KiB10285

STYLE.TXTD26-Jul-20152 KiB5842

WhatsNew40.txtD26-Jul-20153.2 KiB9178

Y2KD26-Jul-201548 42

bpf-ipf.hD26-Jul-201514 KiB453187

bpf_filter.cD26-Jul-201512.4 KiB596427

bsdinstallD26-Jul-20151.1 KiB8981

ip_fil.cD26-Jul-201516.1 KiB821670

ip_msnrpc_pxy.cD26-Jul-20156.3 KiB329264

ipf.hD26-Jul-20159.2 KiB300253

ipmon.hD26-Jul-20152.3 KiB9871

ipt.hD26-Jul-2015743 4425

kmem.hD26-Jul-2015699 3521

md5.cD26-Jul-201511.5 KiB315202

md5.hD26-Jul-20153.3 KiB7324

mkfiltersD26-Jul-20152.6 KiB11796

mlf_ipl.cD26-Jul-201511.5 KiB470400

mlf_rule.cD26-Jul-20153.2 KiB169133

mlfk_rule.cD26-Jul-20151.3 KiB7052

mlh_rule.cD26-Jul-20152.2 KiB11585

opt_inet6.hD26-Jul-201514 21

opts.hD26-Jul-20151.5 KiB6850

pcap-bpf.hD26-Jul-201521.6 KiB688206

pcap-ipf.hD26-Jul-2015722 3616

radix.cD26-Jul-201528 KiB1,215965

radix_ipf.hD26-Jul-20157.5 KiB215162

snoop.hD26-Jul-2015787 4828

todoD26-Jul-20152.9 KiB9970

README

1IP Filter - What's this about ?
2============================
3Web site: http://coombs.anu.edu.au/~avalon/ip-filter.html
4How-to: http://www.obfuscation.org/ipf/ipf-howto.txt
5
6  The idea behind this package is allow those who use Unix workstations as
7routers (a common occurance in Universities it appears) to apply packet
8filtering to packets going in and out of them.  This package has been
9tested on all versions of SunOS 4.1 and Solaris 2.4/2.5, running on Sparcs.
10It is also quite possible for this small kernel extension to be installed
11and used effectively on Sun workstations which don't route IP, just for
12added security.  It can also be integrated with the multicast patches.
13It has also been tested successfully on all of the modern free BSDs as
14well as BSDI, and SGI's IRIX 6.2.
15
16   The filter keeps a rule list for both inbound and outbound sides of
17the IP packet queue and a check is made as early as possible, aiming to
18stop the packet before it even gets as far as being checked for source
19route options.  In the file "BNF", a set of rules for constructing filter
20rules understood by this package is given.  The files in the directory
21"rules", "example.1" ... "example.sr" show example rules you might apply.
22
23   In practise, I've successfully isolated a workstation from all
24machines except the NFS file servers on its local subnets (yeah, ok, so
25this doesn't really increase security, because of NFS, but you get the
26drift on how it can be applied and used).  I've also successfully
27setup and maintained my own firewalls using it with TIS's Firewall Toolkit,
28including using it on an mbone router.
29
30   When using it with multicast IP, the calls to fr_check() should be
31before the packet is unwrapped and after it is encapsulated.  So the
32filter routines will see the packet as a UDP packet, protocol XYZ.
33Whether this is better or worse than having it filter on class D addresses
34is debateable, but the idea behind this package is to be able to
35discriminate between packets as they are on the 'wire', before they
36get routed anywhere, etc.
37
38   It is worth noting, that it is possible, using a small MTU and
39generating tiny fragmented IP packets to generate a TCP packet which
40doesn't contain enough information to filter on the "flags".  Filtering
41on these types of packets is possible, but under the more general case
42of the packets being "short".  ICMP and UDP packets which are too small
43(they don't contain a complete header) are dropped and logged, no questions
44asked.  When filtering on fragmented packets, the last fragment will get
45through for TCP/UDP/ICMP packets.
46
47Bugs/Problems
48-------------
49If you have a problem with IP Filter on your operating system, please email
50a copy of the file "BugReport" with the details of your setup as required
51and email to darrenr@pobox.com.
52
53Some general notes.
54-------------------
55   To add/delete a rule from memory, access to the device in /dev is needed,
56allowing non-root maintenaince.  The filter list in kernel memory is built
57from the kernel's heap.  Each packet coming *in* or *out* is checked against
58the appropriate list, rejects dropped, others passed through.  Thus this will
59work on an individual host, not just gateways.  Presently there is only one
60list for all interfaces, the changes required to make it a per-interface list
61require more .o replacements for the kernel.  When checking a packet, the
62packet is compared to the entire list from top to bottom, the last matching
63line being effective.
64
65
66What does what ?
67----------------
68if_fil.o  (Loadable kernel module)
69	- additional kernel routines to check an access list as to whether
70	  or not to drop or pass a packet.  It currently defaults to pass
71	  on all packets.
72
73ipfstat
74	- digs through your kernel (need to check #define VMUNIX in fils.c)
75	  and /dev/kmem for the access filter list and mini stats table.
76	  Obviously needs to be run priviledged if required.
77
78ipf
79	- reads the files passed as parameters as input files containing new
80	  filter rules to add/delete to the kernel list.  The lines are
81	  inserted in order; the first line is inserted first, and ends up
82	  first on the list.  Subsequent invocations append to the list
83	  unless specified otherwise.
84
85ipftest
86	- test the ruleset given by filename.  Reads in the ruleset and then
87	  waits for stdin.
88
89	  See the man pages (ipf.1, ipftest.1, ipfstat.8) for more detailed
90	  information on what the above do.
91
92mkfilters
93	- suggests a set of filter rules to employ and suggests how to add
94	  routes to back these up.
95
96BNF
97	- BNF rule set for the filter rules
98
99Darren Reed
100darrenr@pobox.com
101http://coombs.anu.edu.au/~avalon/ip-filter.html
102