LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-01-2009, 04:02 AM   #1
aspiringlion
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Rep: Reputation: 0
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 ************************************************************************
 
Old 12-02-2009, 02:46 AM   #2
blues1207
LQ Newbie
 
Registered: Sep 2009
Posts: 7

Rep: Reputation: 0
please use nf_register_hook()/nf_unregister_hook kernel API
 
1 members found this post helpful.
Old 12-04-2009, 03:12 AM   #3
aspiringlion
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 12-06-2009, 06:37 AM   #4
aspiringlion
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
  


Reply

Tags
firewall, kernel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a rule to firewall surya_prakash Linux - Newbie 3 04-07-2009 06:53 AM
some firewall rule sang_froid Linux - Security 3 02-10-2009 10:36 AM
Firewall-Rule Net_Spy Linux - Networking 4 11-20-2007 11:06 AM
how to write this firewall rule ? naihe2010 Linux - Networking 1 01-15-2007 09:56 PM
Need A Firewall Rule linuxboy69 Linux - Software 1 11-26-2003 04:29 PM


All times are GMT -5. The time now is 11:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration