清除IP地址限制规则
appcmd clear config "default web site" -section:system.webserver/security/ipSecurity /delete:true /commit:apphost
设置默认限制规则为限制所有接入
appcmd set config "default web site" -section:system.webserver/security/ipSecurity /allowUnlisted:false /commit:apphost
设置某个IP地址为允许接入
appcmd set config "default web site" -section:system.webserver/security/ipSecurity /+"[ipAddress=$ipAddress,allowed='True']" /commit:apphost
转载于:https://blog.51cto.com/flybozhou/1835593