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?