Skip to contentSkip to conversation

any plan for firewalling before the packet socket hooks?

DISCUSSION Chris Friesen 1 participant 1 message Sep 10, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

I'm interested in filtering packets before the packet socket gets a copy of them, and after the packet socket writes them but before it gets to the device.

Would it be sufficient to add a new NF_HOOK call (for PF_PACKET/NF_PACKET_PRE_ROUTING or something similar) in netif_receive_skb() to handle the incoming side?

Is there anything else required to allow me to create a module to bind in at that hook and do my filtering?

In my personal case, I'm trying to filter the traffic going into my vmware session, and it seems to use a packet socket to do networking, which means that the normal iptables stuff doesn't affect it at all. I'm sure there would be other uses for this kind of thing.

Thanks,

Chris