1

I am trying to develop a code where I can test error conditions of a client connected to a web server by filtering and blocking some type of packets.

For starters, I want to analyse the behavior of the client when it cannot obtain its IP by filtering and blocking the DHCP packets. I used 'scapy' to sniff and create a 'PCAP' log of the DHCP packets but I cannot block the packets.

Is there any way in which I can block the packets from reaching the client?

Abhinav
  • 992
  • 2
  • 11
  • 26

1 Answers1

0

Basically, this is what a "firewall" can do. It has to happen on kernel level rather than on the application level. If you are on Linux, then make use of the netfilter kernel modules via iptables. You will have to perform some research on this topic before you'll feel comfortable with it.

Dr. Jan-Philip Gehrcke
  • 33,287
  • 14
  • 85
  • 130
  • Unfortunatley I am working on Windows. As of now I have seperated the two interfaces. Now I will be working on the bridging so that selective packets can be transferred. – Abhinav Sep 24 '12 at 16:08
  • I am continuing this work like [this](http://stackoverflow.com/questions/12619068/network-bridge-using-scapy-and-python) – Abhinav Sep 27 '12 at 13:41