How to use WFP to forward packaget from specific process to specific network adapter?

mao hei 0 Reputation points
2025-04-14T09:13:21.7266667+00:00

Here is the senario. i got 2 network adapters in my computer.I want to configure one to be ‌exclusively used by a specific program‌ while ‌hiding it from the user‌ and ‌excluding it from system routing. 

i found FWPM_LAYER_IPFORWARD_V4 layer and API FwpsInjectForwardAsync0. Can i use FwpsInjectForwardAsync0 to inject to specific NIC in FWPM_LAYER_IPFORWARD_V4 layer.

I saw in doc " The FwpsInjectForwardAsync0 function injects packet data into the forwarding data path." What's the meaning of forwarding data path? does it mean ip route forward ?

Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
862 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.