Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to make my own network traffic filter. To achieve this, I am building a Linux kernel module using netfilter and getting access to all the network packets. In order to filter these captured network packets I need to use a separate program (*filter_prog*) which I have developed. The output of this *filter_prog* determines whether the packet will be allowed to go through or not.

My query is, how can I use this *filter_prog* in a kernel module?

Secondly, is the approach correct? or there is an alternative approach which is more easy to implement and is fast.

Thanks for any help.


The *filter_prog* performs some hashing on the packet and matches this hash against a list. If the hash matches, the packet is blocked. Also, this hashing is not conventional hashing.

Also, I have found this http://people.ee.ethz.ch/~arkeller/linux/kernel_user_space_howto.html#ss4.1. Not sure which suits the best to my case.

share|improve this question
Under what criterias does this programd ecides to filter or not a packet ? –  Kwaio Aug 22 '13 at 15:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.