How to drop packets using JAVA Program

1.3k Views Asked by At

Possible Duplicate:
Writing a Personal Firewall in Java that drop network packet

Hi friends I am new to this community. I am student of mtech. I am working on DOS attack detection and prevention technique as thesis. I am using jpcap library to capture the packet and I have an algorithm to find the spoofed packets. I want to drop spoofed packets to prevent the system from DoS attack. There is no class available in jpcap to drop the packets. Can anyone help me to find out a way to drop spoofed packets using JAVA program? Thanks in advance.

1

There are 1 best solutions below

7
On

I do not know of any java based API that will allow you to filter packets & as far as I am concerned there is no java API that supports this. none of the pcap libs : jnetpcap,jpcap, winpcap etc.

You would have to use OS dependent firewall API such as

microsoft's: Microsoft firewall API