Score:0

Use AppCmd.exe to delete a restricted IP address

za flag

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 ?

Score:0
cn flag

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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.