Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am developing an application that blocks port scanning attempts on the network to prevent device security breaches. I'm looking for someone to guide me how to block port scan in windows using C# or VB.NET.

What I have tried:

I am developing an application that blocks port scanning attempts on the network to prevent device security breaches. I'm looking for someone to guide me how to block port scan in windows using C# or VB.NET.
Posted
Updated 25-Jul-21 21:14pm
v2

1 solution

Simple. You don't.

This is a firewall configuration issue. If you're trying to block "port scans" from a certain machine, you have to block all outbound ports that are not normally used.

If you're trying to block incoming scans, well, you setup inbound rules to block everything coming into the machine that isn't normally used.

You cannot block all ports because, well, that would be equivalent to pulling the network cable out of the machine and I don't think you want that.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900