basil00 / WinDivert

WinDivert: Windows Packet Divert
https://reqrypt.org/windivert.html
Other
2.56k stars 512 forks source link

Monitoring Packets from a specific NIC #359

Closed cdev1011 closed 7 months ago

cdev1011 commented 9 months ago

Can WinDivert Monitor packets coming from a specific NIC on a machine? Assuming there are two network connections available on the machine for eg. "Ethernet 2 and Ethernet 3"

basil00 commented 7 months ago

Yes, each NIC will have a different IfIdx which can be used to filter traffic. Use the Windows IP Helper API to map specific NICs to IfIdx values.