basil00 / Divert

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

Monitoring Packets from a specific NIC #359

Closed cdev1011 closed 3 months ago

cdev1011 commented 4 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 3 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.