IIS 7 內建「IPv4 位址和網域限制」模組,可針對網站或應用程式設定允許/拒絕特定 IP 或網段存取,增強伺服器安全性。
192.168.1.0/24、10.0.0.100)。<system.webServer>
<security>
<ipSecurity allowUnlisted="false" > <!-- false=預設拒絕, true=預設允許 -->
<add ipAddress="192.168.1.100" allowed="true" /> <!-- 兖許單一 IP -->
<add ipAddress="192.168.1.0" subnetMask="255.255.255.0" allowed="true" /> <-- 允許網段 -->
<add ipAddress="10.0.0.0" subnetMask="255.0.0.0" allowed="false" /> <-- 拒絕網段 -->
</ipSecurity>
</security>
</system.webServer>
同樣在「IPv6 位址和網域限制」中操作,格式如 2001:db8::/32。
%SystemDrive%\inetpub\logs\LogFiles) 記錄客戶端 IP 與狀態碼。REMOTE_ADDR。Add-WebConfigurationProperty。