LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Firewall rule setting from kernel code (http://www.linuxquestions.org/questions/programming-9/firewall-rule-setting-from-kernel-code-772623/)

aspiringlion 12-01-2009 04:02 AM

Firewall rule setting from kernel code
 
Hi all,

I am new to Linux Kernel Programming and working on an application where I need to block some specific traffic which is identified by my code. How can I write a rule to block some specific traffic from kernel code?

Thanks for your willingness to help.

AspiringLion

************************************************************************
Lead me from darkness to light --- Brhadaranyaka Upanishad ************************************************************************

blues1207 12-02-2009 02:46 AM

please use nf_register_hook()/nf_unregister_hook kernel API

aspiringlion 12-04-2009 03:12 AM

Thanks
 
Thanks blues1207 for your helpful reply.
In fact I was using it for analyzing traffic but did not thought that the same can be used for dropping the traffic also.

Thanks again.

AspiringLion

aspiringlion 12-06-2009 06:37 AM

Query about sk_buff
 
How can I read source IP address using sk_buff?
I mean which variable has it?

Thanks for your willingness to help.

aspiringlion


All times are GMT -5. The time now is 08:48 PM.