Search code examples
linux-kerneliptableslibpcap

iptables and libpcap


i have rule set up to drop udp/tcp packets with matching strings. however, my program which captures packet using libpcap, is still able to see this packet.

Why is this/, what should be the iptable rules to drop packets before it is seen by libpcap?

Is there anyway,perhaps other than iptables rules, to drop this packet before it is seen by libpcap/tcpdump?


Solution

  • Yes, libpcap sees all the packets.. They are being captured before being processed by the netfilter.