限制窗口托管环境中的IP地址

时间:2015-02-20 06:16:40

标签: vbscript ip-restrictions

我需要将一个安全部分(代码)添加到位于Windows主机环境中的Web.Config文件中。此安全部分允许从所有IP地址到我们的Web应用程序的流量,除了少数几个; xx.xxx.xx.xx

我不知道Visual Basic脚本,因为我是一名php开发人员,有人可以帮助我摆脱脚本或井指南

任何建议都会感激,等待

1 个答案:

答案 0 :(得分:1)

我能够在基于窗口的托管中添加代码来限制API,将其粘贴给其他人

它是如何完成的

示例IP地址限制。评论包含在内,不是必需的。

允许所有,但阻止特定的IP或网络

<security>
<ipSecurity allowUnlisted="true">
<!-- this line allows everybody, except those listed below -->
<clear/>
<!-- removes all upstream restrictions -->
<add ipAddress="83.116.19.53"/>
<!-- blocks the specific IP of 83.116.19.53  -->
<add ipAddress="83.116.119.0" subnetMask="255.255.255.0"/>
<!--blocks network 83.116.119.0 to 83.116.119.255-->
<add ipAddress="83.116.0.0" subnetMask="255.255.0.0"/>
<!--blocks network 83.116.0.0 to 83.116.255.255-->
<add ipAddress="83.0.0.0" subnetMask="255.0.0.0"/>
<!--blocks entire /8 network of 83.0.0.0 to 83.255.255.255-->
</ipSecurity>
</security>`
相关问题