Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have 20 servers running IIS with an FTP Site that is configured to deny access from all IPs except those that we grant access to. I now need to add an IP to this list. Is there any way to script this out? I've looked through the documentation for the various VBS scripts that come with IIS, but it's not looking very promising.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

It certainly looks like it can be done. Microsoft has an article called Setting IP Security Using ADSI that explains how.

You will obviously need to change the script to suit your needs (set it to loop through your 20 servers for example). Also, I don;'t believe you're using DENY rules, but ALLOW rules, so you may need to change the syntax of the fucntion from IPDENY to IPALLOW (at a guess).

share|improve this answer
    
We ended up just hand-jamming all of it, but this appears to be exactly what I was looking for. Thanks - it will prove useful in the future! –  Michael Wales Sep 8 '10 at 13:55
add comment

What version of IIS? For IIS 7 you can use AppCmd.exe. For IIS 6 you will likely have to use WMI/VBScript as I believe the configuration is stored in the IIS Metabase. Please update your post with what version of IIS you are working with.

share|improve this answer
add comment

You will need to modify them slightly but I have two scripts in this post that allow you to work with the access lists programmatically through VB script.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.