I want to capture all traffic in my Iperf server that I listen for promiscously, even if I am not the intended IP.
I know you can do this with Multicast addresses, but I do not want to follow that way: multicasting on Wifi incurs a throughput loss
I have the current setup: 3 hosts, each with their own wifi NIC in promiscous mode. I want to know how many UDP packets can be received by simply listening promiscously.
For example:
Host 1 is running iperf client: iperf -c 192.168.4.197 -B 192.168.4.142 -b 100M -u
Host 2 is running iperf server: iperf -s -u -B 192.168.4.197
Host 3 is also running iperf server: iperf -s -u -B 0.0.0.0
The binding addresses are the local addresses of the wlan0 interface.
I understand why iperf on Host 3 does not read the promiscously listened packets as its packets: the IP in the packet is not the address of the local wlan0 interface.
However, would there be a way of iperf on Host 3 to receive these packets? Either with iptables/ebtables or maybe a tcpdump rewrite?
If iptables can reroute the promiscuously listened packets to any local IP address, I can capture it using iperf.
I know that I can receive the packets on Host 3 - if I do a tcpdump I can see the packets between Host 1 and Host 2.
I know that packets are only visible on an open (unencrypted) Wifi network. I have it set up this way. This network is only for testing purposes, so it security doesn't matter for now.
Any ideas? Please let me know if you need more information.
EDIT: changed Host 3 binding address to 0.0.0.0. However, that did not solve my problem.