next up previous contents index
Next: Compiling iptables-1.2.7a Up: Setting up routing and Previous: Setting up routing and   Contents   Index


Preparing the Linux kernel

The iptables tool controls firewalling rules implemented in the kernel. Therefore, we need a kernel with an appropriate set up. If you don't select the proposed kernel options in chapter two, please adjust your Linux kernel first:

$ cd ~/Dreamcast/KERNEL/linux
$ make ARCH=sh CROSS_COMPILE=sh4-linux- menuconfig

Table 6.1 points out the necessary options.


Table 6.1: Needed configuration for using iptables.
Option Type
CONFIG_PACKET *
CONFIG_NETFILTER *
CONFIG_UNIX *
CONFIG_INET *
CONFIG_IP_MULTICAST *
CONFIG_IP_NF_CONNTRACK M
CONFIG_IP_NF_FTP M
CONFIG_IP_NF_IRC M
CONFIG_IP_NF_IPTABLES M
CONFIG_IP_NF_MATCH_LIMIT M
CONFIG_IP_NF_MATCH_STATE M
CONFIG_IP_NF_FILTER M
CONFIG_IP_NF_NAT M
CONFIG_IP_NF_TARGET_MASQUERADE M
CONFIG_IP_NF_TARGET_LOG M


If you've selected these options, you have to rebuild your kernel:

$ make ARCH=sh CROSS_COMPILE=sh4-linux- \
  clean dep zImage modules

Finally, you've to install the kernel modules:

$ su -c "make ARCH=sh CROSS_COMPILE=sh4-linux- \
  INSTALL_MOD_PATH=/home/christian/Dreamcast/INITRD modules_install"

Don't be disturbed by the error message at the end: We don't have a depmod utility that handles modules for foreign hardware architectures, so simply ignore it.

Now, change directory to the initial ramdisk and correct the libraries folder:

$ cd ../..
$ cd INITRD
$ cd lib/modules/2.4.18-sh-dc

Remove every file and directory except the directory kernel - it contains our kernel modules. Now, we're ready for compiling the tool iptables.


next up previous contents index
Next: Compiling iptables-1.2.7a Up: Setting up routing and Previous: Setting up routing and   Contents   Index
Christian Berger 2004-10-19