简体   繁体   中英

How do I programmatically add an IP address to the blocked list in Windows Server 2003?

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.

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 technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM