Skip to content

{ Category Archives } kernel module

Update on setting up Ubuntu in order to build kernel modules

As an update to my “hello world” kernel module article, there is a much easier way to set up your Debian-based Linux (including Ubuntu) to build kernel modules, without manually getting the relevant kernel headers using apt-get.
I’ve tested this process with Ubuntu 8.04, 9.04 and 9.10 and it works great. Do the following to set [...]

Tagged , ,

Creating a Netfilter kernel module which filters UDP packets

Last time we created a Netfilter kernel module which simply dropped all packets which gave the structure and functions that need to be implemented for a Netfilter module to work.
This time, we’ll extend the functionality to poke into the IP header, specifically the protocol field, in order to perform functionality specific to a packet type. [...]

Creating a simple ‘hello world’ Netfilter module

This is the second part of the series in creating a NetFilter module for Ubuntu 8.04 (running linux kernel 2.6.24-23). In it I’ll write a simple Netfilter module as a kernel module that simply drops all packets and logs dropped packets to /var/log/messages. In order to implement this we take the code for the kernel [...]

Tagged , , , ,

Creating a “hello world” kernel module in linux

This is part one of my series on creating a Netfilter module in order to implement a routing protocol in Linux. I’ve broken down the challenge into three steps.

Write a simple kernel module (this article)
Add Netfilter hooks to kernel module
Access packet headers within Netfilter hook
Abstract routing daemon to a user space module (for easier debugging)

This [...]

Tagged , , , , ,