ffalcinelli / pydivert

A Python binding for WinDivert driver
GNU Lesser General Public License v3.0
207 stars 36 forks source link

It can't capture some packets from a PC used as a gateway #43

Closed adgarciaar closed 5 years ago

adgarciaar commented 5 years ago

I'm trying to use a PC as a gateway that filters the communication between two other PCs, Unfortunately, pydivert can't capture packets that travel between the two machines to communicate, but it can capture packets that travel from one of the two machines to the PC gateway. I know the limitation because I'm using Wireshark at the same time. This on Windows 10.

Thanks for your help.

Cheers,

Adrian.

mhils commented 5 years ago

This works for us in mitmproxy. Are you using pydivert.Layer.NETWORK_FORWARD?

adgarciaar commented 5 years ago

Thank you very much @mhils, it's working

mosesBD commented 5 years ago

how do i do this transparently meaning that if the destination mac address is not my pc's mac address will i be able to still see the traffic using this method? do i have to enable promiscuous mode on my NIC? and if so will the packets be part of inbound or forwarding chain? tnx