Whole document tree 2. Patch-O-Matic2.1 What is Patch-O-Matic ?
First, you should get the latest CVS tree, to be sure you are using the latest extensions. To do so, perform :
This will create the toplevel directory `netfilter/', and will check out all the files inside for you. Make sure your kernel source is ready in `/usr/src/linux/'. If for whatever reason the kernel you want to patch is not in `/usr/src/linux/' then you can make the variable KERNEL_DIR point to the patch where your kernel is :
Make sure the dependencies are made already. If unsure :
Then you can go back to the netfilter directory, in the `userspace/' directory. You can now invoke p-o-m. 2.2 Running Patch-O-MaticWhile in the `userspace/' directory, let's run p-o-m :
p-o-m will go through all the patches. If they are already applied, you will see so on the `Already applied:' first line. If they are not applied yet, it will display the name of the patch with some explanations. p-o-m will tell you what is going on : `NOT APPLIED ( n missing files)' simply means the patch has not been applied yet, whereas `NOT APPLIED ( n rejects out of n hunks)' generally means that :
A rule of thumb is to read carefully the little explanation text of each patch before actually applying it. As there are currently a LOT of official patches for patch-o-matic (and probably more unofficial ones), it is not recommended to apply them all ! You should really consider applying only the ones you need, even if it means recompiling netfilter when you need more patches. A new form of patch-o-matic has been created, that will only present you with the patches that are known to apply cleanly, or at least that are known to not break every other patches. To invoke it, simply run :
It works exactly the same way as patch-o-matic as far as the interaction and the patching is concerned. You will simply avoid using `developer-only' patches. If you want to play around with "newnat", (if for example you need the H323 conntrack/NAT helper) you need to do as follows :
It will guide you through all the submitted/pending patches, then through the patches related to newnat. 2.3 So what's next ?Once you have applied all the patches you wished to apply, the next step is recompile your kernel and install it. This HOWTO will not explain how to do this. Instead, you can read the Linux Kernel HOWTO. While configuring your kernel, you will see new options in ``Networking Options -> Netfilter Configuration''. Choose the options you need, recompile & install your new kernel. Once your new kernel is installed, you can go ahead and compile and install the ``iptables'' package, from the `userspace/' directory as follows :
That's it ! Your new shiny iptables package is installed ! Now it's time to use these brand new functionalities. Next Previous Contents |