[英]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 通过禁止的IP地址阻止对站点的访问
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? 并在C#ASP.NET MVC堆栈上工作,如何以编程方式将IP地址添加到Windows Server 2003防火墙上的禁止IP地址列表中?
The use case is that the log files on the web app record attacks on a web site. 用例是Web应用程序上的日志文件记录了对网站的攻击。 From the admin page I want to be able to click a button/link and have that IP address added to the blocked list.
从管理页面,我希望能够单击按钮/链接并将该IP地址添加到阻止列表中。
Basically what you'll want to do is modify the IPSec policies of Windows. 基本上,您要做的就是修改Windows的IPSec策略。 I don't want to duplicate answers here, but take a look at the following threads, which should get you what you need:
我不想在这里重复答案,而是看一下以下线程,这些线程应该可以满足您的需求:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.