0

Following on from the general answers in this question:

Blocking access to site by banned IP addresses

and working on a C# ASP.NET MVC stack, how would I programmatically add IP addresses to the list of banned IP addresses on a Windows Server 2003 firewall?

The use case is that the log files on the web app record attacks on a web site. From the admin page I want to be able to click a button/link and have that IP address added to the blocked list.

Community
  • 1
  • 1
Guy
  • 65,082
  • 97
  • 254
  • 325

1 Answers1

2

Basically what you'll want to do is modify the IPSec policies of Windows. I don't want to duplicate answers here, but take a look at the following threads, which should get you what you need:

Community
  • 1
  • 1
The Matt
  • 6,618
  • 7
  • 44
  • 61