blob: 539bd71e2e1ed6f057a7e298a36115154cb1d386 [file] [log] [blame] [raw]
Darren Reed83f3fb12006-06-15 17:43:57 +00001
2Installing IPFilter into OpenBSD 3.5 Kernel
3===========================================
4The installation of IPFilter should be as easy as following the steps
5below. In cases where "i386" is mentioned, if you are working on a
6different platform, substitute that name there and it should work equally
7as well. The patches include enabling IPFilter for IPv4 filtering, IPv6
8filtering and bridge filtering.
9
10The commands given below are intended as guides rather than exact matches
11on what needs to be typed. In many cases, paths to files or directories
12may bear little resemblence to what is presented below.
13
14You may encounter difficulties with step 7 if you have made changes to the
15rc files which cause "patch" to not be able to work out how to apply the
16changes correctly.
17
18If the below steps are followed with no problems then it should be safe to
19perform step 8 and reboot with the new kernel. Of course if you are not
20using GENERIC then substitute GENERIC for your kernel name. If your kernel
21config file includes the "GENERIC" one then you will not need to add explicit
22options for IPFilter.
23
241. Extract your source tree into /usr/src, creating /usr/src/sys.
25
26cd /usr/src
27gunzip -c sys.tar.gz | tar xpf -
28
Martti Kuparinen4a04f462007-10-25 09:29:36 +0000292. Unpack IPFilter and apply the patches to the kernel source
Darren Reed83f3fb12006-06-15 17:43:57 +000030
31cd ~
Darren Reed6b03a342007-08-21 15:22:35 +000032gunzip -c ip_fil4next.tar.gz | tar xpf -
Darren Reed83f3fb12006-06-15 17:43:57 +000033cd /usr/src
Darren Reed6b03a342007-08-21 15:22:35 +000034patch < ~/ip_fil4.1.14/OpenBSD-3/3.5-sys-diffs
Darren Reed83f3fb12006-06-15 17:43:57 +000035
363. Add IPFilter to the source code tree:
37
Darren Reed6b03a342007-08-21 15:22:35 +000038cd ~/ip_fil4next
Darren Reed83f3fb12006-06-15 17:43:57 +000039BSD/kupgrade
40
41If you want to build a new release with IPFilter, stop here and goto
42the section below titled "Building a Release".
43
444. Build a new OpenBSD kernel
45
46/bin/rm -rf /sys/arch/i386/compile/GENERIC
47cd /sys/arch/i386/conf
48config GENERIC
49cd ../compile/GENERIC
50make depend && make
51cp bsd /bsd
52
535. Build and install IPFilter
54
Darren Reed6b03a342007-08-21 15:22:35 +000055cd ip_fil4next
Darren Reed83f3fb12006-06-15 17:43:57 +000056make openbsd
57make install-bsd
58OpenBSD-3/makedevs-3.5
59
606. Patch rc scripts in /etc
61
62cd /etc
Darren Reed6b03a342007-08-21 15:22:35 +000063patch < ~/ip_fil4.1.14/OpenBSD-3/3.5-rc-diffs
Darren Reed83f3fb12006-06-15 17:43:57 +000064
657. Reboot
66
67
68IPFilter device files
69=====================
70Patches to include making IPFilter devices can be found in the file
713.5-MAKEDEV-diffs. These diffs are generally only of interested if
72you are going to be building a distribution for others and want the
73correct MAKEDEV scripts to be built. You may also wish to use this
74to patch /dev/MAKEDEV on your machine to be correct. Pre-fab'd MAKEDEV
75scripts (or individual patches) for each architecture are not provided.
76You will need to have extracted "./etc" from src.tar.gz to use these
77patches.
78
79Building a Release
80==================
81cd /usr/src
Darren Reed6b03a342007-08-21 15:22:35 +000082patch < ~/ip_fil4.1.14/OpenBSD-3/3.5-rc-diffs
83patch < ~/ip_fil4.1.14/OpenBSD-3/3.5-MAKEDEV-diffs
84cd ~/ip_fil4next
Darren Reed83f3fb12006-06-15 17:43:57 +000085./OpenBSD-3/fixdist-3.5
86