Window2008通過web.config進(jìn)行限制ip訪問
限制ip 訪問 禁止訪問的ip或者ip段
<security>
<ipSecurity allowUnlisted="ture">
<clear/>
<add ipAddress="127.0.0.1 allowed="true"/>
<add ipAddress="83.116.19.53 allowed="true"/>
<add ipAddress="83.116.119.0" subnetMask="255.255.255.0" allowed="true"/>
<add ipAddress="83.117.0.0" subnetMask="255.255.0.0" allowed="true"/>
<add ipAddress="83.0.0.0" subnetMask="255.0.0.0" allowed="true"/>
</ipSecurity>
</security>
永許ip訪問 可以訪問的ip或者ip段
<security>
<ipSecurity allowUnlisted="false">
<clear/>
<add ipAddress="127.0.0.1 allowed="true"/>
<add ipAddress="83.116.19.53 allowed="true"/>
<add ipAddress="83.116.119.0" subnetMask="255.255.255.0" allowed="true"/>
<add ipAddress="83.117.0.0" subnetMask="255.255.0.0" allowed="true"/>
<add ipAddress="83.0.0.0" subnetMask="255.0.0.0" allowed="true"/>
</ipSecurity>
</security>