简体   繁体   English

如何在Windows Server 2003中以编程方式将IP地址添加到阻止列表中?

[英]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.

相关问题 如何以编程方式获取计算机的本地网络 IP 地址? - How do I get the Local Network IP address of a computer programmatically? 如何在Windows 8 Metro中将IP地址与网络名称相关联 - How do I associate an IP address to a network name in Windows 8 Metro 如何在客户端程序中指定服务器IP地址? - How do I specify Server Ip address in my Client program? 列出Windows 2003服务器上已安装的服务器角色 - List installed server roles on a Windows 2003 server 使用WebDAV从Exchange Server 2003获取发件人IP地址 - Getting sender IP address from Exchange Server 2003 using WebDAV 如何以编程方式更改IP地址? - how to change ip address programmatically? 如何以编程方式从Windows 2003 Server从无线网络设备检测密码类型和加密级别 - How to programmatically detect Cipher type and Encryption level from a wireless network device from windows 2003 server 如何在运行时以编程方式将项目添加到“水平列表”? - How do I programmatically add items to a Horizontal List at runtime? 我如何以编程方式找到内存地址? - How do I find a memory address programmatically…? 如何在Windows应用商店应用中获取本地主机IP地址? - How do I get the local host IP address in a Windows Store app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM