Re: how to execute command on match?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



linux blr wrote:

hi all,
plz let me know how can i execute a program everytime
there is a match, for example, everytime my Linux box receives a packet with SYN bit
ON, instead of taking normal actions like
ALLOW,DROP,REJECT, i want to execute a command.

google wasn't able to help me, hope this list will..

cheers,
mayank.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com


Hi,
I am not a netfilter guru .So, the information i am giving may be wrong .
You need to write a program in which u register to the netfiler hooks and then do what u wanna do.
Read the article at following link:-
_http://www.linuxjournal.com/article/7184

_Here, main_hook is replace with ur function which perform the operation that u wanna do .

netfilter_ops_out.hook = main_hook;

Thanks,
Vikrant



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux