Windows Filtering Platform - How can I block incoming connections based on local port?
I'm attempting to set up some filters using WFP to block inbound connections to a local server (for example, a webserver listening on port 8080). I've got a filter working which can block based on Remote Port, so I can stop processes on my machine from establishing any connections to port 8080, but I can't figure out how to block incoming connections from another machine based on the local port 8080? Here's my code which works to block based on remote port: (It's C# using P/invoke but it's pretty much the same as if it were written in C++) var RemotePort = 8080 # port to block // connect to