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.

How do i allow access from some specified IP-Adresses (maybe a txt file?) while blocking access by default. Background is that i dont want to copy and past the ip-adresses into every single rule, since it makes it awfull to maintain!

share|improve this question
    
What is the background for this requirement? Perhaps some more manageable technology like domain isolation would be in order? –  Oskar Duveborn Feb 8 '10 at 17:27
add comment

1 Answer

I don't think Windows firewall is quite flexible enough to do what you want. This is kind of hacky, but a way to solve your problem would be to setup a draconian block rule to block everything from every IP, except for the ones you want to allow.

The way to do it is to setup a block rule, and put in very large address ranges like this:

From: 0.0.0.0 To: 69.59.196.210  
From: 69.59.196.213 To: 209.85.225.146  
From: 209.85.225.148 To: 255.255.255.255

This blocks everything except for the 3 IPs: 69.59.196.211, 69.59.196.212, 209.86.225.147

For the 3 IPs that do get in - the rest of the rules will still apply to them as they normally would.

Also, if you do a "custom" rule instead of starting out with a port rule, it allows you to choose "Any" for the protocol to block all protocols/ports.

share|improve this answer
add comment

Your Answer

 
discard

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