AppCmd syntax to add FTP IpV4 Address and Domain Restrictions
I just helped one of my customer writing a script which would add FTP IpV4 Address and Domain Restrictions into the applicationHost.config file. “Configuration Editor” came handy to nail this command. I would say, anybody and everybody wanted to play with AppCmd, and stuck, try your hands on this Configuration Editor which is a part of Administration Pack (still CTP2 at the time of writing) which gives you everything you need – Managed code (C#), Scription (JavaScript) and Command Line (Appcmd) syntax. Below are the commands:
appcmd set config "TestFTP" /section:system.ftpServer/security/ipSecurity /+[ipAddress='65.2.3.68',subnetMask='6.1.2.100',allowed=’true’] /commit:appHost
appcmd set config "TestFTP" /section:system.ftpServer/security/ipSecurity /+[ipAddress='65.2.3.68',allowed=’true’] /commit:appHost
Hope this helps!