oremanj/python-netfilterqueue

Capture traffic from a specific interface

rbshadow opened this issue · 2 comments

Is there any way to capture traffic from a specific interface with NetfilterQueue?

Yes, netfilter_queue will give you the packets matched by your iptables rule. So where the readme says:

iptables -I <table or chain> <match specification> -j NFQUEUE --queue-num <queue number>

then <match specification> is something like:

-i eth0

For example:

iptables -I INPUT -i eth0 -j NFQUEUE --queue-num 0

Thank you very much.