Skip to contentSkip to conversation

Caching of netfilter rules

DISCUSSION Gan HawK 1 participant 1 message Aug 9, 2004 netfilter

lore
Share & tools
lore

Gan HawK

author
#0 lore raw

Hi,

I am interested in implementing a caching system for netfilter rules. The cache would intercept all the packets that have been accepted through all the rules, and store its nfcache along with values of all the nfcache bits that are set. (of course it will discard if NFC_UNKNOWN or NFC_ALTERED or NFC_IP_PROTO_UNKNOWN is set)

Then, when a packet comes in, the cache is first checked to see if it can be accepted, else all the netfilter rules are accepted (normal processing).

I have implemented a test system as kernel module to develop and test the cache. The current testbed system consists of two hooks. One hook in NF_IP_LOCAL_IN with NF_IP_PRI_LAST that updates the cache with new entries and NF_IP_PRE_ROUTING that checks if the packet can be accepted from the cache. Of course, for the end system, I need to change the netfilter code itself to accept packets without further processing.

I would appreciate feedback or comments on the idea or pointers on how to add a call to netfilter to accept packets without further processing. I plan to implement the cache as a module and it will use this netfilter call to accept packets which are in the cache.

thanks,
ganhawk

__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail