IPFilter has two kernel modules, pfil, a streams module and ipf, a WSIO pseudo driver. These are dynamically loadable
kernel modules. When IPFilter is installed on an HP-UX system using swinstall, these two modules are loaded and configured as dynamically
linked modules. They can be loaded and unloaded when required without
shutting down the system as long as the modules are not currently
in use.
Static
Linking of HP-UX IPFilter on HP-UX 11.0 and HP-UX 11i version 1 |
 |
As with any other DLKM modules for HP-UX version 11.0 and
11i version 1, these modules can be statically linked to the kernel.
Follow these steps to statically link the IPFilter modules to the
kernel:
Use the kmadmin command to find out if the modules have been loaded dynamically.
Refer to the kmadmin(1M) manpage for usage information.
For example:
$ kmadmin -s
Table B-1 Title not available (Static
Linking of HP-UX IPFilter on HP-UX 11.0 and HP-UX 11i version 1)
| Name | ID | Status | Type |
|---|
| pfil | 1 | LOADED | STREAMS |
| ipf | 2 | LOADED | WSIO |
Use the kmsystem command to find the status of each module. Refer to the kmsystem(1M) manpage
for more detail. For example:
$ kmsystem -q pfil
Table B-2 Title not available (Static
Linking of HP-UX IPFilter on HP-UX 11.0 and HP-UX 11i version 1)
| Module | Configured | Loadable |
|---|
| pfil | Y | Y |
The output is similar for the ipf module. This output shows that the pfil module is loadable.
Use the kmsystem command to set the loadable parameter to N.
$ kmsystem -l N -c Y ipf
$ kmsystem -q ipf
Table B-3 Title not available (Static
Linking of HP-UX IPFilter on HP-UX 11.0 and HP-UX 11i version 1)
| Module | Configured | Loadable |
|---|
| ipf | Y | N |
$ kmsystem -l N -c Y pfil
Use the following command to build the new kernel
with the modified configuration:
$config /stand/system
Use the kmupdate command to prepare the system to boot from the new kernel
during the next system shutdown.
$ kmupdate /stand/build/vmunix_test
$ shutdown -r 0 # Shutdown the system now
This boots the system using the new kernel that has both IPFilter modules
statically linked.
 |
 |  |
 |
 | CAUTION: If you need to remove or update IPFilter software,
you must reconfigure the ipf and pfil modules to link dynamically into the kernel. The install
and remove scripts for IPFilter assume the IPFilter modules to be dynamically
linked. Do not try installing a newer version or removing the existing
IPFilter product if it is statically linked to the kernel. |
 |
 |  |
 |
Static
Linking of HP-UX IPFilter on HP-UX 11i version 2 |
 |
Use the following steps to statically link the IPFilter modules
to the kernel with HP-UX 11i version 2:
Set up the IPFilter modules to be statically
linked to the kernel using the kcmodule command. The modules will be statically linked at the next
system boot. See the kcmodule (1M) manpage for further details. For example:
$ kcmodule -K -h -s pfil=static
$ kcmodule -K -h -s ipf=static
Reboot the system.
Use
the following steps to return the system back to dynamic linking.
Set up the IPFilter modules to be dynamically
linked to the kernel using the following commands:
$ kcmodule -K -h -s pfil=auto
$ kcmodule -K -h -s ipf=auto
Reboot the system.
 |
 |  |
 |
 | CAUTION: If
you need to remove or update IPFilter software, you must reconfigure the ipf and pfil modules to link dynamically into the kernel. The install
and remove scripts for IPFilter assume the IPFilter modules to be dynamically
linked. Do not try installing a newer version or removing the existing
IPFilter product if it is statically linked to the kernel. |
 |
 |  |
 |