views:

47

answers:

1

Following on from the general answers in this question:

http://stackoverflow.com/questions/1954012/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.

+2  A: 

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:

The Matt