Search code examples
c#ipblock

Block outgoing connection (an IP address) in c#


I would like to block an IP from c#.

I looked up MSDN, and found only firewall exception usage.

Is there any other simpler solutions? I don't want to touch my client's computer setting.


Solution

  • No, only the OS or an application that hooks into the OS can block outgoing connections. The firewall is the best place to do this.