Question

I am running Ubuntu on my machine and want to write some sniffer scripts. But I am getting packets related to my NIC only even if I run my Interface in promisc mode. Is there any IPTABLE rules that i need to put on so that i can get entrie packets on the network?? Please help. I am using python for everything i am doing , if it helps

Was it helpful?

Solution

In a modern switched network, you system is in general only going to see two kinds of traffic: unicast traffic explicitly directed to your system and broadcast traffic that is visible to all systems. Nothing you can do in your code will make other traffic on the network visible to you. Enabling promiscuous mode on your interfaces in this situation is going to net you very little additional traffic.

This is less true in a network with a shared bus -- such as WifI, or back in the old days when we used hubs instead of switches.

Netfilter -- the Linux firewall you manipulate with the iptables command -- really only operates on the layer 3 (ip) level, and isn't going to affect what traffic is visible to your interface.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top