0

I used the following syntax to add an IP address (10.0.0.1) to the restrited IIS 7.5 section for the whole server :

appcmd.exe set config -section:system.webServer/security/ipSecurity /+[ipAddress='10.0.0.1',allowed='False'] /commit:apphost

Very nice so far. The restriction is shown in the blacklist in IIS 7.5.

Now I want to delete this one (10.0.0.1) - and only this one - to give it access to the webserver again. I cannot find the right syntax for it and using the above command with "allowed:'True'" does not work, because the IP address is already in the list as "allowed:'False'".

Can anyone provide me the right syntax to delete one IP address from the blacklist ?

Peter Hahndorf
  • 13,763
  • 3
  • 37
  • 58
Francis
  • 1
  • 1

1 Answers1

0

Try the following:

appcmd.exe set config -section:system.webServer/security/ipSecurity /-"[ipAddress='10.0.0.1',subnetMask='255.255.255.255',domainName='']" /commit:apphost

notice the - instead of the +.

You may also need to change the default:

appcmd.exe set config  -section:system.webServer/security/ipSecurity /allowUnlisted:"True"  /commit:apphost
Peter Hahndorf
  • 13,763
  • 3
  • 37
  • 58