Site blocking access via IP configuration web.config

Copy the following code to save the web.config file, which can be replaced with IP and to increase the need to shield IP, IP-section shield, uploaded to the site root directory to take effect. (Windows IIS systems only)

Masked IP address need only need to add a line <add ipAddress = "needs to be shielded IP" /> in the file can be saved.

Wherein <add ipAddress = "127.255.255.0" subnetMask = "255.255.255.0" /> indicates access to the entire shield segment 127.255.255.0/24


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
<security>
   <ipSecurity allowUnlisted="true">
       <clear/> 
       <add ipAddress="127.0.0.1"/>
       <add ipAddress="127.255.255.0" subnetMask="255.255.255.0"/>
   </ipSecurity>
</security>
</system.webServer>
</configuration>

 

Guess you like

Origin www.cnblogs.com/cannovo/p/11102074.html